Moving NPCs with Packets

Discussion in 'Plugin Development' started by DJCowGaming, May 30, 2020.

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

    DJCowGaming

    I'm trying to move instances of EntityPlayer with packets. I'm trying to use PacketPlayOutRelEntityMove, and on Protocol is says the short parameters are deltas, or changes, so I use this calculation:
    Code:
    short x = (short) ((to.getX() - from.getX()) * 4096);
    short y = (short) ((to.getY() - from.getY()) * 4096);
    short z = (short) ((to.getZ() - from.getZ()) * 4096);
    Protocol stated that 8 blocks is the most you can move a player by, which is not the problem, though I'm not sure what is. Another solution I could use is PacketPlayOutEntityTeleport to move the players, but that doesn't seem to do anything. Is there something I am doing wrong? I'm going off of Protocol, but it isn't very useful, is there a place that has every packet, and explains exactly what they do?
     
Thread Status:
Not open for further replies.

Share This Page