Example #1
0
 public override void Read(byte[] array)
 {
     McByte.TryParse(ref array, out WindowID);
     McShort.TryParse(ref array, out Slot);
     SlotData = new Slot();
     SlotData.Parse(ref array);
 }
Example #2
0
 public override void Read(byte[] array)
 {
     McVarint.TryParse(ref array, out EntityId);
     McDouble.TryParse(ref array, out X);
     McDouble.TryParse(ref array, out Y);
     McDouble.TryParse(ref array, out Z);
     McShort.TryParse(ref array, out Count);
 }
Example #3
0
 public override void Read(byte[] array)
 {
     McVarint.TryParse(ref array, out EntityID);
     McShort.TryParse(ref array, out DeltaX);
     McShort.TryParse(ref array, out DeltaY);
     McShort.TryParse(ref array, out DeltaZ);
     McBoolean.TryParse(ref array, out OnGround);
 }
 public override void Read(byte[] array)
 {
     McVarint.TryParse(ref array, out EntityId);
     McShort.TryParse(ref array, out DeltaX);
     McShort.TryParse(ref array, out DeltaY);
     McShort.TryParse(ref array, out DeltaZ);
     McUnsignedByte.TryParse(ref array, out Yaw);
     McUnsignedByte.TryParse(ref array, out Pitch);
     McBoolean.TryParse(ref array, out OnGround);
 }
Example #5
0
        public override byte[] Write()
        {
            List <byte> bytes = new List <byte>();

            bytes.AddRange(McVarint.ToBytes(EntityId));;
            bytes.AddRange(McDouble.ToBytes(X));
            bytes.AddRange(McDouble.ToBytes(Y));
            bytes.AddRange(McDouble.ToBytes(Z));
            bytes.AddRange(McShort.ToBytes(Count));
            return(bytes.ToArray());
        }
Example #6
0
        public override void Read(byte[] array)
        {
            McUnsignedByte.TryParse(ref array, out WindowID);
            McShort.TryParse(ref array, out Slot);
            McUnsignedByte.TryParse(ref array, out Button);
            McShort.TryParse(ref array, out ActionNumber);
            McVarint.TryParse(ref array, out Mode);
            Slot slot = new Slot();

            slot.Parse(ref array);
        }
Example #7
0
        public Slot[] SlotData;       //Field Type - Array of Slot

        public override void Read(byte[] array)
        {
            McUnsignedByte.TryParse(ref array, out WindowID);
            McShort.TryParse(ref array, out Count);
            SlotData = new Slot[Count];
            for (int i = 0; i < Count; i++)
            {
                SlotData[i] = new Slot();
                SlotData[i].Parse(ref array);
            }
        }
Example #8
0
 public override void Read(byte[] array)
 {
     McVarint.TryParse(ref array, out EntityID);
     McUUID.TryParse(ref array, out EntityUUID);
     McVarint.TryParse(ref array, out Type);
     McDouble.TryParse(ref array, out X);
     McDouble.TryParse(ref array, out Y);
     McDouble.TryParse(ref array, out Z);
     McUnsignedByte.TryParse(ref array, out Yaw);
     McUnsignedByte.TryParse(ref array, out Pitch);
     McUnsignedByte.TryParse(ref array, out HeadPitch);
     McShort.TryParse(ref array, out VelocityX);
     McShort.TryParse(ref array, out VelocityY);
     McShort.TryParse(ref array, out VelocityZ);
 }
Example #9
0
        public override byte[] Write()
        {
            List <byte> bytes = new List <byte>();

            bytes.AddRange(McVarint.ToBytes(EntityId));
            bytes.AddRange(McUUID.ToBytes(UUID));
            bytes.AddRange(McVarint.ToBytes(Type));
            bytes.AddRange(McDouble.ToBytes(X));
            bytes.AddRange(McDouble.ToBytes(Y));
            bytes.AddRange(McDouble.ToBytes(Z));
            bytes.AddRange(McUnsignedByte.ToBytes(Pitch));
            bytes.AddRange(McUnsignedByte.ToBytes(Yaw));
            bytes.AddRange(McInt.ToBytes(Data));
            bytes.AddRange(McShort.ToBytes(VelocityX));
            bytes.AddRange(McShort.ToBytes(VelocityY));
            bytes.AddRange(McShort.ToBytes(VelocityZ));
            return(bytes.ToArray());
        }
Example #10
0
 public override void Read(byte[] array)
 {
     McShort.TryParse(ref array, out Slot);
 }
Example #11
0
 public override byte[] Write()
 {
     return(McShort.ToBytes(Slot));
 }
Example #12
0
 public override void Read(byte[] array)
 {
     McUnsignedByte.TryParse(ref array, out WindowID);
     McShort.TryParse(ref array, out ActionNumber);
     McBoolean.TryParse(ref array, out Accepted);
 }