How can i freeze an entity?

Discussion in 'Plugin Development' started by spiroulis, Oct 24, 2014.

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

    spiroulis

    Hey, so i was wondering, how can you actually make an entity not move at all, not even its head?

    Also, is there a way to freeze an arrow while on air?
     
  2. Offline

    Joiner

    Actually, you can teleport it every tick.
    But, if you wait 1.8 coming out, you can use the NoAI tag.
     
  3. Offline

    Watto

    spiroulis Joiner

    Perhaps setting it's velocity to 0 would be a better idea?
     
  4. Offline

    RainoBoy97

    Clear it's pathfinders.
     
  5. Offline

    Joiner

    Watto I teleport it every tick because setting its speed to 0 doesn't work - players can move it with their bodies.
     
  6. Offline

    ProtoTempus

    spiroulis Joiner I wouldn't teleport it every single move event; rather just cancel the move event. I believe this will looks a little better too.
     
  7. Offline

    Joiner

  8. Offline

    Watto

    Joiner

    Teleporting it every tick just doesn't seem like a good idea at all..

    RainoBoy97 Suggestion for clearing pathfinders is much better.
     
  9. Offline

    mine-care

    Well add potion of slowness with time Integer.MAXINT
    and amp 20 and for the head movement you can set its target to a invisible entity every 2ticks or so
    I don't think players will be able o push it
     
  10. Offline

    Joiner

    Watto I know, but it is the only way to do this because mine-care is wrong - players can push it.
    If you want to avoid a laggy task my suggestion is to wait until 1.8 comes out to use the NoAI tag.
     
  11. Offline

    mine-care

    Joiner annd yes you can push it :( sorry didnt notice in the past....
     
  12. Offline

    spiroulis

    mine-care Joiner Watto ProtoTempus well i dont have a problem if they can be pushed by players i just want to make them not move. Clearing the pathfinder and effecting the entity with slowness sound like good ideas, im gonna try them and see what happens. Thank you all for answering, but is there also a way to freeze an arrow that has been shot too? :)
     
    mine-care likes this.
  13. Offline

    CraftCreeper6

    spiroulis
    Freeze an arrow? As in mid-air?
     
  14. Offline

    spiroulis

  15. Offline

    CraftCreeper6

    spiroulis
    I suppose you could remove its velocity and teleport it every tick or something?
     
  16. Offline

    mine-care

  17. Offline

    CraftCreeper6

    mine-care
    Yes, it would, only thinking of a way to do it. Not saying it's the most efficient :)
     
  18. Offline

    mine-care

    CraftCreeper6 you're right =)
    Another way is to spawn a invisible block or entity and attach the arrow to it
     
  19. Offline

    CraftCreeper6

    mine-care
    Had no idea you could do that. :)
     
  20. Offline

    mine-care

  21. Offline

    CraftCreeper6

Thread Status:
Not open for further replies.

Share This Page