Ejemplo n.º 1
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteVarint(EntityId);
     writer.WriteShort(VelocityX);
     writer.WriteShort(VelocityY);
     writer.WriteShort(VelocityZ);
 }
Ejemplo n.º 2
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteVarint(EntityId);
     writer.WriteShort((short)((CurrentPos.X * 32 - PreviousPos.X * 32) * 128));
     writer.WriteShort((short)((CurrentPos.Y * 32 - PreviousPos.Y * 32) * 128));
     writer.WriteShort((short)((CurrentPos.Z * 32 - PreviousPos.Z * 32) * 128));
     writer.WriteBool(OnGround);
 }
Ejemplo n.º 3
0
 public static void WriteItemStackProto(this PrimitiveWriter writer, ItemStack itemStack)
 {
     if (itemStack.IsEmpty)
     {
         writer.WriteShort(-1);
         return;
     }
     writer.WriteShort(itemStack.Item.Id);
     writer.WriteByte(itemStack.Count);
     writer.WriteShort(itemStack.Damage);
     writer.WriteNbtBlob(itemStack.Nbt);
 }
Ejemplo n.º 4
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteVarint(EntityId);
     writer.WriteUuidProto(Uuid);
     writer.WriteByte(Type);
     writer.WriteDouble(X);
     writer.WriteDouble(Y);
     writer.WriteDouble(Z);
     writer.WriteAngleProto(Pitch);
     writer.WriteAngleProto(Yaw);
     writer.WriteInt(Data);
     writer.WriteShort(VelocityX);
     writer.WriteShort(VelocityY);
     writer.WriteShort(VelocityZ);
 }
Ejemplo n.º 5
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteVarint(EntityId);
     writer.WriteDouble(X);
     writer.WriteDouble(Y);
     writer.WriteDouble(Z);
     writer.WriteShort(Count);
 }
Ejemplo n.º 6
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteByte(WindowId);
     writer.WriteShort((short)Items.Count);
     foreach (var i in Items)
     {
         writer.WriteItemStackProto(i);
     }
 }
Ejemplo n.º 7
0
 internal override void Write(PrimitiveWriter writer) => writer.WriteShort(Value);
Ejemplo n.º 8
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteSByte(WindowId);
     writer.WriteShort(Slot);
     writer.WriteItemStackProto(ItemStack);
 }
Ejemplo n.º 9
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteByte(WindowId);
     writer.WriteShort(ActionNum);
     writer.WriteBool(Accepted);
 }
Ejemplo n.º 10
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteByte(WindowId);
     writer.WriteShort(Property);
     writer.WriteShort(Value);
 }