use of org.dragonet.net.packet.minecraft.SetEntityMotionPacket in project Dragonet-Legacy by DragonetMC.
the class EntityVelocityMessageTranslator method handleSpecific.
@Override
public PEPacket[] handleSpecific(EntityVelocityMessage packet) {
SetEntityMotionPacket pkMotion = new SetEntityMotionPacket();
SetEntityMotionPacket.EntityMotionData data = new SetEntityMotionPacket.EntityMotionData();
data.eid = packet.id;
data.motionX = (float) packet.velocityX / 32;
data.motionY = (float) packet.velocityY / 32;
data.motionZ = (float) packet.velocityZ / 32;
pkMotion.motions = new SetEntityMotionPacket.EntityMotionData[] { data };
return new PEPacket[] { pkMotion };
}
Aggregations