Beispiel #1
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     ProtocolVersion = stream.ReadVarInt();
     ServerHostname = stream.ReadString();
     ServerPort = stream.ReadUInt16();
     NextState = (NetworkMode)stream.ReadVarInt();
     return NextState;
 }
Beispiel #2
0
        public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
        {
            ChunkCount = stream.ReadInt16();
            var length = stream.ReadInt32();
            LightIncluded = stream.ReadBoolean();
            ChunkData = stream.ReadUInt8Array(length);

            ChunkMetadata = new Metadata[ChunkCount];
            for (int i = 0; i < ChunkCount; i++)
            {
                var metadata = new Metadata();
                metadata.ChunkX = stream.ReadInt32();
                metadata.ChunkZ = stream.ReadInt32();
                metadata.PrimaryBitMap = stream.ReadUInt16();
                metadata.AddBitMap = stream.ReadUInt16();
                ChunkMetadata[i] = metadata;
            }
            return mode;
        }
Beispiel #3
0
        public void ReadPacket(MinecraftStream stream)
        {
            ChunkCount = stream.ReadInt16();
            var length = stream.ReadInt32();
            LightIncluded = stream.ReadBoolean();
            ChunkData = stream.ReadUInt8Array(length);

            ChunkMetadata = new Metadata[ChunkCount];
            for (int i = 0; i < ChunkCount; i++)
            {
                var metadata = new Metadata();
                metadata.ChunkX = stream.ReadInt32();
                metadata.ChunkZ = stream.ReadInt32();
                metadata.PrimaryBitMap = stream.ReadUInt16();
                metadata.AddBitMap = stream.ReadUInt16();
                ChunkMetadata[i] = metadata;
            }
        }
Beispiel #4
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     X = stream.ReadInt32();
     Z = stream.ReadInt32();
     GroundUpContinuous = stream.ReadBoolean();
     PrimaryBitMap = stream.ReadUInt16();
     var length = stream.ReadVarInt();
     Data = stream.ReadUInt8Array(length);
     return mode;
 }
Beispiel #5
0
 public void ReadPacket(MinecraftStream stream)
 {
     X = stream.ReadInt32();
     Z = stream.ReadInt32();
     GroundUpContinuous = stream.ReadBoolean();
     PrimaryBitMap = stream.ReadUInt16();
     AddBitMap = stream.ReadUInt16();
     var length = stream.ReadInt32();
     Data = stream.ReadUInt8Array(length);
 }