Package org.spout.vanilla.protocol.msg.entity.pos

Examples of org.spout.vanilla.protocol.msg.entity.pos.EntityYawMessage


     * - The entity moves less than 4 blocks and maybe changes rotation.
     */
    if (force || deltaX > 128 || deltaX < -128 || deltaY > 128 || deltaY < -128 || deltaZ > 128 || deltaZ < -128) {
      messages.add(new EntityTeleportMessage(entity.getId(), newX, newY, newZ, newYaw, newPitch));
      if (force || looked) {
        messages.add(new EntityYawMessage(entity.getId(), newYaw, newPitch));
      }
    } else if (deltaX != 0 || deltaY != 0 || deltaZ != 0 || deltaYaw != 0 || deltaPitch != 0) {
      if (looked) {
        messages.add(new EntityRelativePositionYawMessage(entity.getId(), deltaX, deltaY, deltaZ, newYaw, newPitch));
      } else if (!prevTransform.getPosition().equals(newTransform.getPosition())) {
View Full Code Here


  @Override
  public EntityYawMessage decode(ByteBuf buffer) throws IOException {
    int id = buffer.readInt();
    int rotation = buffer.readUnsignedByte();
    int pitch = buffer.readUnsignedByte();
    return new EntityYawMessage(id, rotation, pitch);
  }
View Full Code Here

TOP

Related Classes of org.spout.vanilla.protocol.msg.entity.pos.EntityYawMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.