Block Manipulation starts at what level? Eye or Feet?

Discussion in 'Plugin Development' started by Jaker232, Jul 13, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Jaker232

    I'm developing a plugin that allows you to generate a 15x15 bedrock cube hollowed with torches, and I want to know where the base starts, does it start in the eye level or the feet?
     
  2. Offline

    Taco

    If you're using player.getLocation() it returns the location of your lower body. You will need to subtract 1 from the Y to get the block below them.
     
  3. Offline

    Jaker232

    @Taco Thanks for the fast reply, I can start working on the bedrock generation code from a command (I originally plan on adding a few command to different sizes, and this will help.)

    You will be credited for Most Helped.
     
  4. Offline

    Taco

    No problem. I usually lurk here when I'm bored, so if you have any other problems, just post em here and you should get a sufficient answer.
     
  5. Offline

    Jaker232

    Okay, one thing, do I need to call the function? I'm in my main class and I'm trying to make the level below, and 15 blocks in all cardinal direction (flat compass) bedrock but Location and Block (I believe) is underlined with Red. Any ideas?
     
  6. Offline

    nisovin

    Did you import them?
     
  7. Offline

    Jaker232

    I'll try to do that later, my IDE was pretty slow yesterday, I just want to give it a cool-down.
     
  8. Offline

    Taco

    This is likely the issue.
     
  9. Offline

    DrBowe

    I've found that eclipse has some difficulties with importing classes (automatically, that is).

    If you type out a long line of code that uses 3 new imports, for example, it won't suggest to import all 3.
    Instead, it just tells you that they can't be found. This could be what's happening with you (if you are using Eclipse)
     
  10. Offline

    Taco

    I've never had this issue before.
     
  11. Offline

    DrBowe

    Really?
    What version of Eclipse are you using? I can re-produce it fairly easily on Helios
     
  12. Offline

    Taco

    Version 3.6.1. I don't know how recent that is, I haven't updated in ages.
     
  13. Offline

    DrBowe

    Ah well. Its not worth it to look into it, since it's not hard to fix for me (just import them as you go), and because there's hardly ever a scenario where you'd have such a long line of code.
     
  14. Offline

    atrain99

    What if you are standing on a slab(half-block)?
     
  15. Offline

    Darkman2412

    First of all, don't bump old topics. It will return the doubleslab-block (I don't know the id of it).
     
Thread Status:
Not open for further replies.

Share This Page