Solved Get Navigation from entity

Discussion in 'Plugin Development' started by MisterErwin, Jul 6, 2013.

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

    MisterErwin

    Hello together,

    in 1.5.2 it was possible to get net.minecraft.server.v1_6_R1.Navigation via
    Code:java
    1. Navigation n = ((CraftLivingEntity) e).getHandle().getNavigation();


    But in 1.6.1 I receive: The method getNavigation() is undefined for the type EntityLiving

    So... How can I get the Navigation from an Entity?

    Thanks,
    MisterErwin
     
  2. Don't cast it to Entity but to EntityInsentient.
     
    macmc likes this.
  3. Offline

    MisterErwin

    Maybe I wrote it wrong - Entity should be a variable....

    Sorry if you understood it wrong....
     
  4. Navigation n = ((EntityInsentient)((CraftLivingEntity) e).getHandle()).getNavigation();
     
  5. Offline

    MisterErwin

    Oh..... Thank you ;)

    And (facepalm)....
     
  6. Offline

    macmc

    I love you <3
     
  7. Offline

    tom1000o

    beautiful! I've been looking for the solution to this for a while now.
     
Thread Status:
Not open for further replies.

Share This Page