remote entities. trying to create human entity

Discussion in 'Plugin Development' started by deivisxm, Apr 14, 2014.

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

    deivisxm

    Hi i am using remote entities to create human npc that should be controled as a players pet. i can spawn it but it doesnt move. Could someone explain me whye? here is the code:
    Code:java
    1. RemotePlayer s = (RemotePlayer) Mravian.manager.createNamedEntity(RemoteEntityType.Human, caster.getLocation(),caster.getName());
    2. s.getMind().clearTargetingDesires();
    3. s.getMind().clearMovementDesires();
    4. TamingFeature feature = new RemoteTamingFeature(s);
    5. feature.tame(caster);
    6. s.getFeatures().addFeature(feature);
    7. s.getMind().addMovementDesire(new DesireMoveAndMeleeAttack(s,LivingEntity.class, true) , 1);
    8. s.getMind().addMovementDesire(new DesireMoveToTarget(s,10) , 6);
    9. s.getMind().addTargetingDesire(new DesireProtectOwner(s,13, false) , 2);
    10. s.getMind().addTargetingDesire(new DesireHelpAttacking(s,6, false) , 1);
    11. s.getMind().addMovementDesire(new DesireFollowTamer(s,3, 6) , 4);
    12. s.setSpeed(0.5);

    im trying to do this for 3 hours.

    bump
    Also caster is a player and the same code works for spiders

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  2. Offline

    RawCode

    3 hours and zero debug messages?
     
  3. Offline

    deivisxm

    RawCode how to use debug with bukkit?

    ok, found out how to use debug, but there are no messages.. anyway if someone have done human entities before pls tell me how...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  4. Offline

    RawCode

    if there is no messages - add them.

    if you added and they not displayed - your code not executed.
     
  5. Offline

    deivisxm

    still nothing. da freaking npc isnt moving
     
Thread Status:
Not open for further replies.

Share This Page