public NetworkState ReadPacket(PacketByteBuf packet, NetworkState state, NetworkSide side) { Id = packet.ReadVarInt(); //this.uuid = arg.readUuid(); //this.entityTypeId = (EntityType)Registry.ENTITY_TYPE.get(arg.readVarInt()); var x = packet.ReadDouble(); var y = packet.ReadDouble(); var z = packet.ReadDouble(); Position = new Vector3(Convert.ToSingle(x), Convert.ToSingle(y), Convert.ToSingle(z)); var pitch = packet.ReadByte(); var yaw = packet.ReadByte(); Look = new Vector2(pitch, yaw); EntityData = packet.ReadVarInt(); var velocityX = packet.ReadInt16(); var velocityY = packet.ReadInt16(); var velocityZ = packet.ReadInt16(); Velocity = new Vector3(velocityX, velocityY, velocityZ); return(state); }
public NetworkState ReadPacket(PacketByteBuf packet, NetworkState state, NetworkSide side) { Id = packet.ReadVarInt(); //this.uuid = packet.readUuid(); var x = packet.ReadDouble(); var y = packet.ReadDouble(); var z = packet.ReadDouble(); Position = new Vector3(Convert.ToSingle(x), Convert.ToSingle(y), Convert.ToSingle(z)); var yaw = packet.ReadByte(); var pitch = packet.ReadByte(); Look = new Vector2(yaw, pitch); return(state); }
public NetworkState ReadPacket(PacketByteBuf packet, NetworkState state, NetworkSide side) { EntityId = packet.ReadVarInt(); Position = packet.readBlockPos(); Progress = packet.ReadByte(); return(state); }
public NetworkState ReadPacket(PacketByteBuf packet, NetworkState state, NetworkSide side) { Position = packet.readBlockPos(); BlockEntityType = packet.ReadByte(); var a = new NbtReader(packet); Tag =; return(state); }