public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction) { ProtocolVersion = stream.ReadVarInt(); ServerHostname = stream.ReadString(); ServerPort = stream.ReadUInt16(); NextState = (NetworkMode)stream.ReadVarInt(); return NextState; }
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; }
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; } }
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; }
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); }