public void BlockAction(MinecraftClient client, IPacket packet) { var BlockPacket = (CBBlockAction)packet; switch (BlockPacket.BlockType) { case 25: // -- Note block client.RaiseNoteBlockSound(BlockPacket.Byte1, BlockPacket.Byte2, BlockPacket.X, BlockPacket.Y, BlockPacket.Z); break; case 29: // -- Sticky Piston client.RaisePistonMoved(BlockPacket.Byte1, BlockPacket.Byte2, BlockPacket.X, BlockPacket.Y, BlockPacket.Z); break; case 33: // -- Piston client.RaisePistonMoved(BlockPacket.Byte1, BlockPacket.Byte2, BlockPacket.X, BlockPacket.Y, BlockPacket.Z); break; case 54: // -- Chest client.RaiseChestStateChange(BlockPacket.Byte2, BlockPacket.X, BlockPacket.Y, BlockPacket.Z); break; case 146: // -- Trapped chest client.RaiseChestStateChange(BlockPacket.Byte2, BlockPacket.X, BlockPacket.Y, BlockPacket.Z); break; default: client.RaiseError(this, "Unknown block action received: " + BlockPacket.BlockType.ToString()); break; } }