public override byte[] Write() { List <byte> bytes = new List <byte>(); bytes.AddRange(McVarint.ToBytes((int)Status)); bytes.AddRange(Location.Write()); bytes.AddRange(McUnsignedByte.ToBytes((byte)Face)); return(bytes.ToArray()); }
public byte[] Stream() { var data = Write(); var buffer = new List <byte>(data.Length + 1); buffer.AddRange(McVarint.ToBytes(data.Length + 1)); buffer.AddRange(McVarint.ToBytes(PacketId)); buffer.AddRange(data); return(buffer.ToArray()); }
public override byte[] Write() { List <byte> bytes = new List <byte>(); bytes.AddRange(McVarint.ToBytes(ProtocolVersion)); bytes.AddRange(McString.ToBytes(Address)); bytes.AddRange(McUnsignedShort.ToBytes(Port)); bytes.AddRange(McVarint.ToBytes((int)LoginState)); return(bytes.ToArray()); }
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()); }
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()); }
public override byte[] Write() { return(McVarint.ToBytes((int)ActionID)); }
public override byte[] Write() { return(McVarint.ToBytes((int)Hand)); }
public override byte[] Write() { return(McVarint.ToBytes(TeleportID)); }
public override byte[] Write() { return(McVarint.ToBytes(Threshold)); }