public IPacket ReadPacket(IMinecraftDataReader reader) { Location = Position.FromReaderLong(reader); Byte1 = reader.ReadByte(); Byte2 = reader.ReadByte(); BlockType = reader.ReadVarInt(); switch (BlockType) { case 25: BlockAction = new BlockActionNoteBlock(Byte1, Byte2, BlockType); break; case 29: case 33: BlockAction = new BlockActionPiston(Byte1, Byte2, BlockType); break; case 54: case 130: // TODO: Check case 146: // TODO: Check BlockAction = new BlockActionChest(Byte1, Byte2, BlockType); break; } return(this); }
public IPacket ReadPacket(IMinecraftDataReader reader) { Location = Position.FromReaderLong(reader); Byte1 = reader.ReadByte(); Byte2 = reader.ReadByte(); BlockType = reader.ReadVarInt(); switch (BlockType) { case 25: BlockAction = new BlockActionNoteBlock(Byte1, Byte2, BlockType); break; case 29: case 33: BlockAction = new BlockActionPiston(Byte1, Byte2, BlockType); break; case 54: case 130: // TODO: Check case 146: // TODO: Check BlockAction = new BlockActionChest(Byte1, Byte2, BlockType); break; } return this; }