Deprecated entity.getTargetBlock() method.

Discussion in 'Plugin Development' started by acburdine, Sep 11, 2013.

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

    acburdine

    Hello! I'm working on my plugin, specifically updating it, and I noticed that in the new R1.0 of the Bukkit API they deprecated the entity.getTargetBlock() method. I know I can still use that method, but as it is now deprecated I was wondering if there is another method that would do something similar?
     
  2. Offline

    xTrollxDudex

    acburdine
    Just because it's deprecated doesn't mean you shouldn't use it. Try and see.
     
  3. Offline

    metalhedd


    Actually that's exactly what it means :p you shouldn't use it, but you can, and it works.
     
  4. Offline

    xTrollxDudex

    metalhedd
    It means you're not supposed to use it. Doesn't mean you shouldn't. I'm a rebel so I can't really tell the difference, either way, can't hurt to try.
     
    Skyost likes this.
  5. Yeah.. but what's the alternertive?
     
  6. Offline

    fireblast709

    Using a BlockIterator and looping over it
    Code:
    BlockIterator bit = new BlockIterator(livingentity, distance);
    Block next;
    while(bit.hasNext())
    {
        next = bit.next();
        // Do whatever
    }
     
    blha303 and !Phoenix! like this.
Thread Status:
Not open for further replies.

Share This Page