public byte[] VerifyToken; //Byte Array public override void Read(byte[] array) { McVarint.TryParse(ref array, out SharedSecretLength); McByteArray.TryParse(ref array, out SharedSecret); McVarint.TryParse(ref array, out VerifyTokenLength); McByteArray.TryParse(ref array, out VerifyToken); }
public byte[] VerifyToken; // Byte Array public override void Read(byte[] array) { McString.TryParse(ref array, out ServerID); McVarint.TryParse(ref array, out PublicKeyLength); McByteArray.TryParse(ref array, out PublicKey); McVarint.TryParse(ref array, out VerifyTokenLength); McByteArray.TryParse(ref array, out VerifyToken); }
public byte[] Data; //Optional Byte Array public override void Read(byte[] array) { McVarint.TryParse(ref array, out MessageID); McBoolean.TryParse(ref array, out Successful); if (Successful) { McByteArray.TryParse(ref array, out Data); } }
public override void Read(byte[] array) { McFloat.TryParse(ref array, out X); McFloat.TryParse(ref array, out Y); McFloat.TryParse(ref array, out Z); McFloat.TryParse(ref array, out Strength); McInt.TryParse(ref array, out RecordCount); McByteArray.TryParse(ref array, out Records); McFloat.TryParse(ref array, out PlayerMotionX); McFloat.TryParse(ref array, out PlayerMotionY); McFloat.TryParse(ref array, out PlayerMotionZ); }
public override void Read(byte[] array) { McInt.TryParse(ref array, out ChunkX); // int McInt.TryParse(ref array, out ChunkZ); // int McBoolean.TryParse(ref array, out Fullchunk); // bool McVarint.TryParse(ref array, out PrimaryBitMask); // var int McNbtCompoundTag.TryParse(ref array, out Heightmaps); if (Fullchunk) { McVarint.TryParse(ref array, out Biomeslength); Biomes = new int[Biomeslength]; for (int i = 0; i < Biomeslength; i++) { McVarint.TryParse(ref array, out Biomes[i]); } } // chunk data McVarint.TryParse(ref array, out Size); // size varint McByteArray.TryParse(Size, ref array, out Data); // Byte array // BlockEntities McVarint.TryParse(ref array, out NumberOfBlockEntities); BlockEntities = new NbtCompoundTag[NumberOfBlockEntities]; var read1 = new NbtParser(); Stream stream1 = new MemoryStream(array); for (int i = 0; i < NumberOfBlockEntities; i++) { BlockEntities[i] = read1.ParseNbtStream(stream1); } }
public byte[] Data; //Byte Array public override void Read(byte[] array) { McString.TryParse(ref array, out Channel); McByteArray.TryParse(ref array, out Data); }