diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2022-01-02 15:47:48 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2022-01-02 15:47:48 +0100 |
commit | 9245ab7e053ae166d07f5bac3869094eb1264431 (patch) | |
tree | e87ec929b4924644e817791089c40e8aad7a9ed3 /src | |
parent | ClientHandle: improve right-click robustness (#5372) (diff) | |
download | cuberite-9245ab7e053ae166d07f5bac3869094eb1264431.tar cuberite-9245ab7e053ae166d07f5bac3869094eb1264431.tar.gz cuberite-9245ab7e053ae166d07f5bac3869094eb1264431.tar.bz2 cuberite-9245ab7e053ae166d07f5bac3869094eb1264431.tar.lz cuberite-9245ab7e053ae166d07f5bac3869094eb1264431.tar.xz cuberite-9245ab7e053ae166d07f5bac3869094eb1264431.tar.zst cuberite-9245ab7e053ae166d07f5bac3869094eb1264431.zip |
Diffstat (limited to '')
-rw-r--r-- | src/BlockInfo.cpp | 304 | ||||
-rw-r--r-- | src/Blocks/BlockHandler.cpp | 12 | ||||
-rw-r--r-- | src/Items/ItemHandler.cpp | 46 |
3 files changed, 181 insertions, 181 deletions
diff --git a/src/BlockInfo.cpp b/src/BlockInfo.cpp index c5590649d..4f2513928 100644 --- a/src/BlockInfo.cpp +++ b/src/BlockInfo.cpp @@ -20,9 +20,9 @@ bool IsBlockIce(BLOCKTYPE a_BlockType) { switch (a_BlockType) { + case E_BLOCK_FROSTED_ICE: case E_BLOCK_ICE: case E_BLOCK_PACKED_ICE: - case E_BLOCK_FROSTED_ICE: { return true; } @@ -68,10 +68,10 @@ bool IsBlockRail(BLOCKTYPE a_BlockType) { switch (a_BlockType) { - case E_BLOCK_RAIL: case E_BLOCK_ACTIVATOR_RAIL: case E_BLOCK_DETECTOR_RAIL: case E_BLOCK_POWERED_RAIL: + case E_BLOCK_RAIL: { return true; } @@ -88,8 +88,8 @@ bool IsBlockTypeOfDirt(BLOCKTYPE a_BlockType) switch (a_BlockType) { case E_BLOCK_DIRT: - case E_BLOCK_GRASS: case E_BLOCK_FARMLAND: + case E_BLOCK_GRASS: case E_BLOCK_GRASS_PATH: { return true; @@ -147,51 +147,51 @@ bool IsBlockMaterialWood(BLOCKTYPE a_BlockType) { switch (a_BlockType) { - case E_BLOCK_PLANKS: - case E_BLOCK_LOG: - case E_BLOCK_NOTE_BLOCK: + case E_BLOCK_ACACIA_DOOR: + case E_BLOCK_ACACIA_FENCE: + case E_BLOCK_ACACIA_FENCE_GATE: + case E_BLOCK_ACACIA_WOOD_STAIRS: + case E_BLOCK_BIRCH_DOOR: + case E_BLOCK_BIRCH_FENCE: + case E_BLOCK_BIRCH_FENCE_GATE: + case E_BLOCK_BIRCH_WOOD_STAIRS: case E_BLOCK_BOOKCASE: - case E_BLOCK_OAK_WOOD_STAIRS: case E_BLOCK_CHEST: case E_BLOCK_CRAFTING_TABLE: - case E_BLOCK_SIGN_POST: - case E_BLOCK_OAK_DOOR: - case E_BLOCK_WALLSIGN: - case E_BLOCK_WOODEN_PRESSURE_PLATE: - case E_BLOCK_JUKEBOX: + case E_BLOCK_DARK_OAK_DOOR: + case E_BLOCK_DARK_OAK_FENCE: + case E_BLOCK_DARK_OAK_FENCE_GATE: + case E_BLOCK_DARK_OAK_WOOD_STAIRS: + case E_BLOCK_DAYLIGHT_SENSOR: + case E_BLOCK_DOUBLE_WOODEN_SLAB: case E_BLOCK_FENCE: - case E_BLOCK_TRAPDOOR: case E_BLOCK_HUGE_BROWN_MUSHROOM: case E_BLOCK_HUGE_RED_MUSHROOM: - case E_BLOCK_OAK_FENCE_GATE: - case E_BLOCK_DOUBLE_WOODEN_SLAB: - case E_BLOCK_WOODEN_SLAB: - case E_BLOCK_SPRUCE_WOOD_STAIRS: - case E_BLOCK_BIRCH_WOOD_STAIRS: + case E_BLOCK_INVERTED_DAYLIGHT_SENSOR: + case E_BLOCK_JUKEBOX: + case E_BLOCK_JUNGLE_DOOR: + case E_BLOCK_JUNGLE_FENCE: + case E_BLOCK_JUNGLE_FENCE_GATE: case E_BLOCK_JUNGLE_WOOD_STAIRS: - case E_BLOCK_TRAPPED_CHEST: - case E_BLOCK_DAYLIGHT_SENSOR: + case E_BLOCK_LOG: case E_BLOCK_NEW_LOG: - case E_BLOCK_ACACIA_WOOD_STAIRS: - case E_BLOCK_DARK_OAK_WOOD_STAIRS: + case E_BLOCK_NOTE_BLOCK: + case E_BLOCK_OAK_DOOR: + case E_BLOCK_OAK_FENCE_GATE: + case E_BLOCK_OAK_WOOD_STAIRS: + case E_BLOCK_PLANKS: + case E_BLOCK_SIGN_POST: + case E_BLOCK_SPRUCE_DOOR: + case E_BLOCK_SPRUCE_FENCE: + case E_BLOCK_SPRUCE_FENCE_GATE: + case E_BLOCK_SPRUCE_WOOD_STAIRS: case E_BLOCK_STANDING_BANNER: + case E_BLOCK_TRAPDOOR: + case E_BLOCK_TRAPPED_CHEST: + case E_BLOCK_WALLSIGN: case E_BLOCK_WALL_BANNER: - case E_BLOCK_INVERTED_DAYLIGHT_SENSOR: - case E_BLOCK_SPRUCE_FENCE_GATE: - case E_BLOCK_BIRCH_FENCE_GATE: - case E_BLOCK_JUNGLE_FENCE_GATE: - case E_BLOCK_DARK_OAK_FENCE_GATE: - case E_BLOCK_ACACIA_FENCE_GATE: - case E_BLOCK_SPRUCE_FENCE: - case E_BLOCK_BIRCH_FENCE: - case E_BLOCK_JUNGLE_FENCE: - case E_BLOCK_DARK_OAK_FENCE: - case E_BLOCK_ACACIA_FENCE: - case E_BLOCK_SPRUCE_DOOR: - case E_BLOCK_BIRCH_DOOR: - case E_BLOCK_JUNGLE_DOOR: - case E_BLOCK_ACACIA_DOOR: - case E_BLOCK_DARK_OAK_DOOR: + case E_BLOCK_WOODEN_PRESSURE_PLATE: + case E_BLOCK_WOODEN_SLAB: { return true; } @@ -210,23 +210,23 @@ bool IsBlockMaterialPlants(BLOCKTYPE a_BlockType) { switch (a_BlockType) { - case E_BLOCK_SAPLING: - case E_BLOCK_DANDELION: - case E_BLOCK_FLOWER: + case E_BLOCK_BEETROOTS: case E_BLOCK_BROWN_MUSHROOM: - case E_BLOCK_RED_MUSHROOM: + case E_BLOCK_CARROTS: + case E_BLOCK_CHORUS_FLOWER: + case E_BLOCK_CHORUS_PLANT: + case E_BLOCK_COCOA_POD: case E_BLOCK_CROPS: - case E_BLOCK_REEDS: - case E_BLOCK_PUMPKIN_STEM: - case E_BLOCK_MELON_STEM: + case E_BLOCK_DANDELION: + case E_BLOCK_FLOWER: case E_BLOCK_LILY_PAD: + case E_BLOCK_MELON_STEM: case E_BLOCK_NETHER_WART: - case E_BLOCK_COCOA_POD: - case E_BLOCK_CARROTS: case E_BLOCK_POTATOES: - case E_BLOCK_CHORUS_PLANT: - case E_BLOCK_CHORUS_FLOWER: - case E_BLOCK_BEETROOTS: + case E_BLOCK_PUMPKIN_STEM: + case E_BLOCK_RED_MUSHROOM: + case E_BLOCK_REEDS: + case E_BLOCK_SAPLING: { return true; } @@ -245,10 +245,10 @@ bool IsBlockMaterialVine(BLOCKTYPE a_BlockType) { switch (a_BlockType) { - case E_BLOCK_TALL_GRASS: + case E_BLOCK_BIG_FLOWER: case E_BLOCK_DEAD_BUSH: + case E_BLOCK_TALL_GRASS: case E_BLOCK_VINES: - case E_BLOCK_BIG_FLOWER: { return true; } @@ -267,23 +267,23 @@ bool IsBlockMaterialIron(BLOCKTYPE a_BlockType) { switch (a_BlockType) { - case E_BLOCK_LAPIS_BLOCK: - case E_BLOCK_GOLD_BLOCK: - case E_BLOCK_IRON_BLOCK: - case E_BLOCK_DIAMOND_BLOCK: - case E_BLOCK_IRON_DOOR: - case E_BLOCK_IRON_BARS: + case E_BLOCK_BLOCK_OF_REDSTONE: case E_BLOCK_BREWING_STAND: case E_BLOCK_CAULDRON: - case E_BLOCK_EMERALD_BLOCK: + case E_BLOCK_CHAIN_COMMAND_BLOCK: case E_BLOCK_COMMAND_BLOCK: - case E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE: + case E_BLOCK_DIAMOND_BLOCK: + case E_BLOCK_EMERALD_BLOCK: + case E_BLOCK_GOLD_BLOCK: case E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE: - case E_BLOCK_BLOCK_OF_REDSTONE: case E_BLOCK_HOPPER: + case E_BLOCK_IRON_BARS: + case E_BLOCK_IRON_BLOCK: + case E_BLOCK_IRON_DOOR: case E_BLOCK_IRON_TRAPDOOR: + case E_BLOCK_LAPIS_BLOCK: + case E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE: case E_BLOCK_REPEATING_COMMAND_BLOCK: - case E_BLOCK_CHAIN_COMMAND_BLOCK: case E_BLOCK_STRUCTURE_BLOCK: { return true; @@ -312,9 +312,9 @@ bool IsBlockMaterialGourd(BLOCKTYPE a_BlockType) { switch (a_BlockType) { - case E_BLOCK_PUMPKIN: case E_BLOCK_JACK_O_LANTERN: case E_BLOCK_MELON: + case E_BLOCK_PUMPKIN: { return true; } @@ -333,64 +333,64 @@ bool IsBlockMaterialRock(BLOCKTYPE a_BlockType) { switch (a_BlockType) { - case E_BLOCK_STONE: - case E_BLOCK_COBBLESTONE: case E_BLOCK_BEDROCK: - case E_BLOCK_GOLD_ORE: - case E_BLOCK_IRON_ORE: + case E_BLOCK_BLOCK_OF_COAL: + case E_BLOCK_BONE_BLOCK: + case E_BLOCK_BRICK: + case E_BLOCK_BRICK_STAIRS: case E_BLOCK_COAL_ORE: - case E_BLOCK_LAPIS_ORE: + case E_BLOCK_COBBLESTONE: + case E_BLOCK_COBBLESTONE_STAIRS: + case E_BLOCK_COBBLESTONE_WALL: + case E_BLOCK_DIAMOND_ORE: case E_BLOCK_DISPENSER: - case E_BLOCK_SANDSTONE: + case E_BLOCK_DOUBLE_RED_SANDSTONE_SLAB: case E_BLOCK_DOUBLE_STONE_SLAB: - case E_BLOCK_STONE_SLAB: - case E_BLOCK_BRICK: - case E_BLOCK_MOSSY_COBBLESTONE: - case E_BLOCK_OBSIDIAN: - case E_BLOCK_MOB_SPAWNER: - case E_BLOCK_DIAMOND_ORE: + case E_BLOCK_DROPPER: + case E_BLOCK_EMERALD_ORE: + case E_BLOCK_ENCHANTMENT_TABLE: + case E_BLOCK_ENDER_CHEST: + case E_BLOCK_END_BRICKS: + case E_BLOCK_END_PORTAL_FRAME: + case E_BLOCK_END_STONE: case E_BLOCK_FURNACE: + case E_BLOCK_GOLD_ORE: + case E_BLOCK_HARDENED_CLAY: + case E_BLOCK_IRON_ORE: + case E_BLOCK_LAPIS_ORE: case E_BLOCK_LIT_FURNACE: - case E_BLOCK_COBBLESTONE_STAIRS: - case E_BLOCK_STONE_PRESSURE_PLATE: - case E_BLOCK_REDSTONE_ORE: - case E_BLOCK_REDSTONE_ORE_GLOWING: + case E_BLOCK_MAGMA: + case E_BLOCK_MOB_SPAWNER: + case E_BLOCK_MOSSY_COBBLESTONE: case E_BLOCK_NETHERRACK: - case E_BLOCK_STONE_BRICKS: - case E_BLOCK_BRICK_STAIRS: - case E_BLOCK_STONE_BRICK_STAIRS: case E_BLOCK_NETHER_BRICK: case E_BLOCK_NETHER_BRICK_FENCE: case E_BLOCK_NETHER_BRICK_STAIRS: - case E_BLOCK_ENCHANTMENT_TABLE: - case E_BLOCK_END_PORTAL_FRAME: - case E_BLOCK_END_STONE: - case E_BLOCK_SANDSTONE_STAIRS: - case E_BLOCK_EMERALD_ORE: - case E_BLOCK_ENDER_CHEST: - case E_BLOCK_COBBLESTONE_WALL: case E_BLOCK_NETHER_QUARTZ_ORE: - case E_BLOCK_QUARTZ_BLOCK: - case E_BLOCK_QUARTZ_STAIRS: - case E_BLOCK_DROPPER: - case E_BLOCK_STAINED_CLAY: + case E_BLOCK_OBSERVER: + case E_BLOCK_OBSIDIAN: case E_BLOCK_PRISMARINE_BLOCK: - case E_BLOCK_HARDENED_CLAY: - case E_BLOCK_BLOCK_OF_COAL: - case E_BLOCK_RED_SANDSTONE: - case E_BLOCK_RED_SANDSTONE_STAIRS: - case E_BLOCK_DOUBLE_RED_SANDSTONE_SLAB: - case E_BLOCK_RED_SANDSTONE_SLAB: case E_BLOCK_PURPUR_BLOCK: - case E_BLOCK_PURPUR_PILLAR: - case E_BLOCK_PURPUR_STAIRS: case E_BLOCK_PURPUR_DOUBLE_SLAB: + case E_BLOCK_PURPUR_PILLAR: case E_BLOCK_PURPUR_SLAB: - case E_BLOCK_END_BRICKS: - case E_BLOCK_MAGMA: + case E_BLOCK_PURPUR_STAIRS: + case E_BLOCK_QUARTZ_BLOCK: + case E_BLOCK_QUARTZ_STAIRS: + case E_BLOCK_REDSTONE_ORE: + case E_BLOCK_REDSTONE_ORE_GLOWING: case E_BLOCK_RED_NETHER_BRICK: - case E_BLOCK_BONE_BLOCK: - case E_BLOCK_OBSERVER: + case E_BLOCK_RED_SANDSTONE: + case E_BLOCK_RED_SANDSTONE_SLAB: + case E_BLOCK_RED_SANDSTONE_STAIRS: + case E_BLOCK_SANDSTONE: + case E_BLOCK_SANDSTONE_STAIRS: + case E_BLOCK_STAINED_CLAY: + case E_BLOCK_STONE: + case E_BLOCK_STONE_BRICKS: + case E_BLOCK_STONE_BRICK_STAIRS: + case E_BLOCK_STONE_PRESSURE_PLATE: + case E_BLOCK_STONE_SLAB: { return true; } @@ -419,10 +419,10 @@ NIBBLETYPE cBlockInfo::GetLightValue(const BLOCKTYPE Block) case E_BLOCK_BROWN_MUSHROOM: return 1; case E_BLOCK_BURNING_FURNACE: return 13; case E_BLOCK_DRAGON_EGG: return 1; + case E_BLOCK_ENDER_CHEST: return 7; case E_BLOCK_END_PORTAL: return 15; case E_BLOCK_END_PORTAL_FRAME: return 1; case E_BLOCK_END_ROD: return 14; - case E_BLOCK_ENDER_CHEST: return 7; case E_BLOCK_FIRE: return 15; case E_BLOCK_GLOWSTONE: return 15; case E_BLOCK_JACK_O_LANTERN: return 15; @@ -464,19 +464,19 @@ NIBBLETYPE cBlockInfo::GetSpreadLightFalloff(const BLOCKTYPE Block) case E_BLOCK_BIRCH_DOOR: case E_BLOCK_BIRCH_FENCE: case E_BLOCK_BIRCH_FENCE_GATE: - case E_BLOCK_BROWN_MUSHROOM: case E_BLOCK_BREWING_STAND: + case E_BLOCK_BROWN_MUSHROOM: case E_BLOCK_CACTUS: case E_BLOCK_CAKE: case E_BLOCK_CARPET: case E_BLOCK_CARROTS: case E_BLOCK_CAULDRON: + case E_BLOCK_CHEST: case E_BLOCK_CHORUS_FLOWER: case E_BLOCK_CHORUS_PLANT: - case E_BLOCK_CHEST: case E_BLOCK_COBBLESTONE_WALL: - case E_BLOCK_COCOA_POD: case E_BLOCK_COBWEB: + case E_BLOCK_COCOA_POD: case E_BLOCK_CROPS: case E_BLOCK_DANDELION: case E_BLOCK_DARK_OAK_DOOR: @@ -492,7 +492,6 @@ NIBBLETYPE cBlockInfo::GetSpreadLightFalloff(const BLOCKTYPE Block) case E_BLOCK_END_PORTAL_FRAME: case E_BLOCK_END_ROD: case E_BLOCK_FENCE: - case E_BLOCK_OAK_FENCE_GATE: case E_BLOCK_FIRE: case E_BLOCK_FLOWER: case E_BLOCK_FLOWER_POT: @@ -512,13 +511,15 @@ NIBBLETYPE cBlockInfo::GetSpreadLightFalloff(const BLOCKTYPE Block) case E_BLOCK_LADDER: case E_BLOCK_LEAVES: case E_BLOCK_LEVER: - case E_BLOCK_LILY_PAD: case E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE: + case E_BLOCK_LILY_PAD: case E_BLOCK_MELON_STEM: case E_BLOCK_MOB_SPAWNER: case E_BLOCK_NETHER_PORTAL: case E_BLOCK_NETHER_WART: case E_BLOCK_NEW_LEAVES: + case E_BLOCK_OAK_DOOR: + case E_BLOCK_OAK_FENCE_GATE: case E_BLOCK_PISTON: case E_BLOCK_PISTON_EXTENSION: case E_BLOCK_PISTON_MOVED_BLOCK: @@ -526,12 +527,12 @@ NIBBLETYPE cBlockInfo::GetSpreadLightFalloff(const BLOCKTYPE Block) case E_BLOCK_POWERED_RAIL: case E_BLOCK_PUMPKIN_STEM: case E_BLOCK_RAIL: - case E_BLOCK_RED_MUSHROOM: case E_BLOCK_REDSTONE_REPEATER_OFF: case E_BLOCK_REDSTONE_REPEATER_ON: case E_BLOCK_REDSTONE_TORCH_OFF: case E_BLOCK_REDSTONE_TORCH_ON: case E_BLOCK_REDSTONE_WIRE: + case E_BLOCK_RED_MUSHROOM: case E_BLOCK_SAPLING: case E_BLOCK_SIGN_POST: case E_BLOCK_SNOW: @@ -552,10 +553,9 @@ NIBBLETYPE cBlockInfo::GetSpreadLightFalloff(const BLOCKTYPE Block) case E_BLOCK_TRIPWIRE: case E_BLOCK_TRIPWIRE_HOOK: case E_BLOCK_VINES: - case E_BLOCK_WALL_BANNER: case E_BLOCK_WALLSIGN: + case E_BLOCK_WALL_BANNER: case E_BLOCK_WOODEN_BUTTON: - case E_BLOCK_OAK_DOOR: case E_BLOCK_WOODEN_PRESSURE_PLATE: return 1; // Light in ice and water disappears faster: @@ -610,11 +610,14 @@ bool cBlockInfo::FullyOccupiesVoxel(const BLOCKTYPE Block) { case E_BLOCK_BARRIER: case E_BLOCK_BEDROCK: + case E_BLOCK_BLACK_GLAZED_TERRACOTTA: case E_BLOCK_BLOCK_OF_COAL: case E_BLOCK_BLOCK_OF_REDSTONE: + case E_BLOCK_BLUE_GLAZED_TERRACOTTA: case E_BLOCK_BONE_BLOCK: case E_BLOCK_BOOKCASE: case E_BLOCK_BRICK: + case E_BLOCK_BROWN_GLAZED_TERRACOTTA: case E_BLOCK_CHAIN_COMMAND_BLOCK: case E_BLOCK_CLAY: case E_BLOCK_COAL_ORE: @@ -623,6 +626,7 @@ bool cBlockInfo::FullyOccupiesVoxel(const BLOCKTYPE Block) case E_BLOCK_CONCRETE: case E_BLOCK_CONCRETE_POWDER: case E_BLOCK_CRAFTING_TABLE: + case E_BLOCK_CYAN_GLAZED_TERRACOTTA: case E_BLOCK_DIAMOND_BLOCK: case E_BLOCK_DIAMOND_ORE: case E_BLOCK_DIRT: @@ -637,29 +641,14 @@ bool cBlockInfo::FullyOccupiesVoxel(const BLOCKTYPE Block) case E_BLOCK_END_STONE: case E_BLOCK_FROSTED_ICE: case E_BLOCK_FURNACE: + case E_BLOCK_GLASS: case E_BLOCK_GLOWSTONE: case E_BLOCK_GOLD_BLOCK: case E_BLOCK_GOLD_ORE: - case E_BLOCK_WHITE_GLAZED_TERRACOTTA: - case E_BLOCK_ORANGE_GLAZED_TERRACOTTA: - case E_BLOCK_MAGENTA_GLAZED_TERRACOTTA: - case E_BLOCK_LIGHT_BLUE_GLAZED_TERRACOTTA: - case E_BLOCK_YELLOW_GLAZED_TERRACOTTA: - case E_BLOCK_LIME_GLAZED_TERRACOTTA: - case E_BLOCK_PINK_GLAZED_TERRACOTTA: - case E_BLOCK_GRAY_GLAZED_TERRACOTTA: - case E_BLOCK_LIGHT_GRAY_GLAZED_TERRACOTTA: - case E_BLOCK_CYAN_GLAZED_TERRACOTTA: - case E_BLOCK_PURPLE_GLAZED_TERRACOTTA: - case E_BLOCK_BLUE_GLAZED_TERRACOTTA: - case E_BLOCK_BROWN_GLAZED_TERRACOTTA: - case E_BLOCK_GREEN_GLAZED_TERRACOTTA: - case E_BLOCK_BLACK_GLAZED_TERRACOTTA: - case E_BLOCK_RED_GLAZED_TERRACOTTA: - case E_BLOCK_GLASS: - case E_BLOCK_STAINED_GLASS: case E_BLOCK_GRASS: case E_BLOCK_GRAVEL: + case E_BLOCK_GRAY_GLAZED_TERRACOTTA: + case E_BLOCK_GREEN_GLAZED_TERRACOTTA: case E_BLOCK_HARDENED_CLAY: case E_BLOCK_HAY_BALE: case E_BLOCK_HUGE_BROWN_MUSHROOM: @@ -671,7 +660,11 @@ bool cBlockInfo::FullyOccupiesVoxel(const BLOCKTYPE Block) case E_BLOCK_JUKEBOX: case E_BLOCK_LAPIS_BLOCK: case E_BLOCK_LAPIS_ORE: + case E_BLOCK_LIGHT_BLUE_GLAZED_TERRACOTTA: + case E_BLOCK_LIGHT_GRAY_GLAZED_TERRACOTTA: + case E_BLOCK_LIME_GLAZED_TERRACOTTA: case E_BLOCK_LOG: + case E_BLOCK_MAGENTA_GLAZED_TERRACOTTA: case E_BLOCK_MAGMA: case E_BLOCK_MELON: case E_BLOCK_MOB_SPAWNER: @@ -685,30 +678,37 @@ bool cBlockInfo::FullyOccupiesVoxel(const BLOCKTYPE Block) case E_BLOCK_NOTE_BLOCK: case E_BLOCK_OBSERVER: case E_BLOCK_OBSIDIAN: + case E_BLOCK_ORANGE_GLAZED_TERRACOTTA: case E_BLOCK_PACKED_ICE: + case E_BLOCK_PINK_GLAZED_TERRACOTTA: case E_BLOCK_PLANKS: case E_BLOCK_PRISMARINE_BLOCK: case E_BLOCK_PUMPKIN: + case E_BLOCK_PURPLE_GLAZED_TERRACOTTA: case E_BLOCK_PURPUR_BLOCK: - case E_BLOCK_PURPUR_PILLAR: case E_BLOCK_PURPUR_DOUBLE_SLAB: + case E_BLOCK_PURPUR_PILLAR: case E_BLOCK_QUARTZ_BLOCK: - case E_BLOCK_RED_NETHER_BRICK: - case E_BLOCK_RED_SANDSTONE: case E_BLOCK_REDSTONE_LAMP_OFF: case E_BLOCK_REDSTONE_LAMP_ON: case E_BLOCK_REDSTONE_ORE: case E_BLOCK_REDSTONE_ORE_GLOWING: + case E_BLOCK_RED_GLAZED_TERRACOTTA: + case E_BLOCK_RED_NETHER_BRICK: + case E_BLOCK_RED_SANDSTONE: case E_BLOCK_REPEATING_COMMAND_BLOCK: - case E_BLOCK_SANDSTONE: case E_BLOCK_SAND: + case E_BLOCK_SANDSTONE: case E_BLOCK_SILVERFISH_EGG: case E_BLOCK_SPONGE: case E_BLOCK_STAINED_CLAY: + case E_BLOCK_STAINED_GLASS: case E_BLOCK_STONE: case E_BLOCK_STONE_BRICKS: case E_BLOCK_STRUCTURE_BLOCK: - case E_BLOCK_WOOL: return true; + case E_BLOCK_WHITE_GLAZED_TERRACOTTA: + case E_BLOCK_WOOL: + case E_BLOCK_YELLOW_GLAZED_TERRACOTTA: return true; default: return false; } } @@ -768,8 +768,8 @@ bool cBlockInfo::IsPistonBreakable(const BLOCKTYPE Block) case E_BLOCK_CARROTS: case E_BLOCK_CHORUS_FLOWER: case E_BLOCK_CHORUS_PLANT: - case E_BLOCK_COCOA_POD: case E_BLOCK_COBWEB: + case E_BLOCK_COCOA_POD: case E_BLOCK_CROPS: case E_BLOCK_CYAN_SHULKER_BOX: case E_BLOCK_DANDELION: @@ -788,15 +788,15 @@ bool cBlockInfo::IsPistonBreakable(const BLOCKTYPE Block) case E_BLOCK_IRON_TRAPDOOR: case E_BLOCK_JACK_O_LANTERN: case E_BLOCK_JUNGLE_DOOR: + case E_BLOCK_LADDER: + case E_BLOCK_LAVA: + case E_BLOCK_LEAVES: + case E_BLOCK_LEVER: case E_BLOCK_LIGHT_BLUE_SHULKER_BOX: case E_BLOCK_LIGHT_GRAY_SHULKER_BOX: case E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE: case E_BLOCK_LILY_PAD: case E_BLOCK_LIME_SHULKER_BOX: - case E_BLOCK_LADDER: - case E_BLOCK_LAVA: - case E_BLOCK_LEAVES: - case E_BLOCK_LEVER: case E_BLOCK_MAGENTA_SHULKER_BOX: case E_BLOCK_MELON: case E_BLOCK_MELON_STEM: @@ -850,9 +850,9 @@ bool cBlockInfo::IsRainBlocker(const BLOCKTYPE Block) switch (Block) { case E_BLOCK_SIGN_POST: + case E_BLOCK_STANDING_BANNER: case E_BLOCK_WALLSIGN: - case E_BLOCK_WALL_BANNER: - case E_BLOCK_STANDING_BANNER: return true; + case E_BLOCK_WALL_BANNER: return true; default: return IsSolid(Block); } } @@ -925,12 +925,12 @@ bool cBlockInfo::IsSolid(const BLOCKTYPE Block) case E_BLOCK_POTATOES: case E_BLOCK_POWERED_RAIL: case E_BLOCK_RAIL: - case E_BLOCK_RED_MUSHROOM: case E_BLOCK_REDSTONE_REPEATER_OFF: case E_BLOCK_REDSTONE_REPEATER_ON: case E_BLOCK_REDSTONE_TORCH_OFF: case E_BLOCK_REDSTONE_TORCH_ON: case E_BLOCK_REDSTONE_WIRE: + case E_BLOCK_RED_MUSHROOM: case E_BLOCK_SAPLING: case E_BLOCK_SIGN_POST: case E_BLOCK_SNOW: @@ -945,8 +945,8 @@ bool cBlockInfo::IsSolid(const BLOCKTYPE Block) case E_BLOCK_TRIPWIRE: case E_BLOCK_TRIPWIRE_HOOK: case E_BLOCK_VINES: - case E_BLOCK_WALL_BANNER: case E_BLOCK_WALLSIGN: + case E_BLOCK_WALL_BANNER: case E_BLOCK_WATER: case E_BLOCK_WOODEN_BUTTON: case E_BLOCK_WOODEN_PRESSURE_PLATE: return false; @@ -1011,11 +1011,11 @@ bool cBlockInfo::IsTransparent(const BLOCKTYPE Block) case E_BLOCK_DETECTOR_RAIL: case E_BLOCK_DRAGON_EGG: case E_BLOCK_ENCHANTMENT_TABLE: + case E_BLOCK_ENDER_CHEST: case E_BLOCK_END_GATEWAY: case E_BLOCK_END_PORTAL: case E_BLOCK_END_PORTAL_FRAME: case E_BLOCK_END_ROD: - case E_BLOCK_ENDER_CHEST: case E_BLOCK_FARMLAND: case E_BLOCK_FENCE: case E_BLOCK_FIRE: @@ -1077,16 +1077,16 @@ bool cBlockInfo::IsTransparent(const BLOCKTYPE Block) case E_BLOCK_PURPUR_STAIRS: case E_BLOCK_QUARTZ_STAIRS: case E_BLOCK_RAIL: - case E_BLOCK_RED_MUSHROOM: - case E_BLOCK_RED_SANDSTONE_SLAB: - case E_BLOCK_RED_SANDSTONE_STAIRS: - case E_BLOCK_RED_SHULKER_BOX: case E_BLOCK_REDSTONE_ORE_GLOWING: case E_BLOCK_REDSTONE_REPEATER_OFF: case E_BLOCK_REDSTONE_REPEATER_ON: case E_BLOCK_REDSTONE_TORCH_OFF: case E_BLOCK_REDSTONE_TORCH_ON: case E_BLOCK_REDSTONE_WIRE: + case E_BLOCK_RED_MUSHROOM: + case E_BLOCK_RED_SANDSTONE_SLAB: + case E_BLOCK_RED_SANDSTONE_STAIRS: + case E_BLOCK_RED_SHULKER_BOX: case E_BLOCK_SANDSTONE_STAIRS: case E_BLOCK_SAPLING: case E_BLOCK_SEA_LANTERN: @@ -1115,8 +1115,8 @@ bool cBlockInfo::IsTransparent(const BLOCKTYPE Block) case E_BLOCK_TRIPWIRE: case E_BLOCK_TRIPWIRE_HOOK: case E_BLOCK_VINES: - case E_BLOCK_WALL_BANNER: case E_BLOCK_WALLSIGN: + case E_BLOCK_WALL_BANNER: case E_BLOCK_WATER: case E_BLOCK_WHITE_SHULKER_BOX: case E_BLOCK_WOODEN_BUTTON: diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp index 937f800fd..de9d37428 100644 --- a/src/Blocks/BlockHandler.cpp +++ b/src/Blocks/BlockHandler.cpp @@ -215,8 +215,6 @@ namespace constexpr cBlockStairsHandler BlockBirchWoodStairsHandler (E_BLOCK_BIRCH_WOOD_STAIRS); constexpr cBlockGlazedTerracottaHandler BlockBlackGlazedTerracottaHandler (E_BLOCK_BLACK_GLAZED_TERRACOTTA); constexpr cDefaultBlockHandler BlockBlackShulkerBoxHandler (E_BLOCK_BLACK_SHULKER_BOX); - constexpr cDefaultBlockHandler BlockCoalBlockHandler (E_BLOCK_BLOCK_OF_COAL); - constexpr cDefaultBlockHandler BlockRedstoneBlockHandler (E_BLOCK_BLOCK_OF_REDSTONE); constexpr cBlockGlazedTerracottaHandler BlockBlueGlazedTerracottaHandler (E_BLOCK_BLUE_GLAZED_TERRACOTTA); constexpr cDefaultBlockHandler BlockBlueShulkerBoxHandler (E_BLOCK_BLUE_SHULKER_BOX); constexpr cDefaultBlockHandler BlockBoneBlockHandler (E_BLOCK_BONE_BLOCK); @@ -237,6 +235,7 @@ namespace constexpr cDefaultBlockHandler BlockChorusFlowerHandler (E_BLOCK_CHORUS_FLOWER); constexpr cDefaultBlockHandler BlockChorusPlantHandler (E_BLOCK_CHORUS_PLANT); constexpr cDefaultOreHandler BlockClayHandler (E_BLOCK_CLAY); + constexpr cDefaultBlockHandler BlockCoalBlockHandler (E_BLOCK_BLOCK_OF_COAL); constexpr cDefaultOreHandler BlockCoalOreHandler (E_BLOCK_COAL_ORE); constexpr cDefaultBlockHandler BlockCobblestoneHandler (E_BLOCK_COBBLESTONE); constexpr cBlockStairsHandler BlockCobblestoneStairsHandler (E_BLOCK_COBBLESTONE_STAIRS); @@ -269,12 +268,12 @@ namespace constexpr cDefaultOreHandler BlockEmeraldOreHandler (E_BLOCK_EMERALD_ORE); constexpr cBlockEnchantingTableHandler BlockEnchantingTableHandler (E_BLOCK_ENCHANTMENT_TABLE); constexpr cDefaultBlockHandler BlockEndBricksHandler (E_BLOCK_END_BRICKS); + constexpr cBlockEnderChestHandler BlockEnderChestHandler (E_BLOCK_ENDER_CHEST); constexpr cDefaultBlockHandler BlockEndGatewayHandler (E_BLOCK_END_GATEWAY); constexpr cBlockEndPortalFrameHandler BlockEndPortalFrameHandler (E_BLOCK_END_PORTAL_FRAME); constexpr cDefaultBlockHandler BlockEndPortalHandler (E_BLOCK_END_PORTAL); constexpr cDefaultBlockHandler BlockEndRodHandler (E_BLOCK_END_ROD); constexpr cDefaultBlockHandler BlockEndStoneHandler (E_BLOCK_END_STONE); - constexpr cBlockEnderChestHandler BlockEnderChestHandler (E_BLOCK_ENDER_CHEST); constexpr cBlockFarmlandHandler BlockFarmlandHandler (E_BLOCK_FARMLAND); constexpr cBlockFenceHandler BlockFenceHandler (E_BLOCK_FENCE); constexpr cBlockFireHandler BlockFireHandler (E_BLOCK_FIRE); @@ -343,12 +342,12 @@ namespace constexpr cBlockStairsHandler BlockNetherBrickStairsHandler (E_BLOCK_NETHER_BRICK_STAIRS); constexpr cBlockPortalHandler BlockNetherPortalHandler (E_BLOCK_NETHER_PORTAL); constexpr cDefaultOreHandler BlockNetherQuartzOreHandler (E_BLOCK_NETHER_QUARTZ_ORE); + constexpr cBlockNetherrack BlockNetherrackHandler (E_BLOCK_NETHERRACK); constexpr cDefaultBlockHandler BlockNetherWartBlockHandler (E_BLOCK_NETHER_WART_BLOCK); constexpr cBlockNetherWartHandler BlockNetherWartHandler (E_BLOCK_NETHER_WART); - constexpr cBlockNetherrack BlockNetherrackHandler (E_BLOCK_NETHERRACK); constexpr cBlockLeavesHandler BlockNewLeavesHandler (E_BLOCK_NEW_LEAVES); constexpr cBlockSidewaysHandler BlockNewLogHandler (E_BLOCK_NEW_LOG); - constexpr cBlockNoteBlockHandler BlockNoteBlockHandler (E_BLOCK_NOTE_BLOCK); + constexpr cBlockNoteBlockHandler BlockNoteBlockHandler (E_BLOCK_NOTE_BLOCK); constexpr cBlockDoorHandler BlockOakDoorHandler (E_BLOCK_OAK_DOOR); constexpr cBlockFenceGateHandler BlockOakFenceGateHandler (E_BLOCK_OAK_FENCE_GATE); constexpr cBlockStairsHandler BlockOakWoodStairsHandler (E_BLOCK_OAK_WOOD_STAIRS); @@ -386,6 +385,7 @@ namespace constexpr cBlockSlabHandler BlockRedSandstoneSlabHandler (E_BLOCK_RED_SANDSTONE_SLAB); constexpr cBlockStairsHandler BlockRedSandstoneStairsHandler (E_BLOCK_RED_SANDSTONE_STAIRS); constexpr cDefaultBlockHandler BlockRedShulkerBoxHandler (E_BLOCK_RED_SHULKER_BOX); + constexpr cDefaultBlockHandler BlockRedstoneBlockHandler (E_BLOCK_BLOCK_OF_REDSTONE); constexpr cBlockRedstoneLampHandler BlockRedstoneLampHandler (E_BLOCK_REDSTONE_LAMP_ON); constexpr cBlockGlowingRedstoneOreHandler BlockRedstoneOreGlowingHandler (E_BLOCK_REDSTONE_ORE_GLOWING); constexpr cBlockRedstoneOreHandler BlockRedstoneOreHandler (E_BLOCK_REDSTONE_ORE); @@ -417,8 +417,8 @@ namespace constexpr cBlockLavaHandler BlockStationaryLavaHandler (E_BLOCK_STATIONARY_LAVA); constexpr cBlockWaterHandler BlockStationaryWaterHandler (E_BLOCK_STATIONARY_WATER); constexpr cBlockPistonHandler BlockStickyPistonHandler (E_BLOCK_STICKY_PISTON); - constexpr cBlockStairsHandler BlockStoneBrickStairsHandler (E_BLOCK_STONE_BRICK_STAIRS); constexpr cDefaultBlockHandler BlockStoneBricksHandler (E_BLOCK_STONE_BRICKS); + constexpr cBlockStairsHandler BlockStoneBrickStairsHandler (E_BLOCK_STONE_BRICK_STAIRS); constexpr cBlockButtonHandler BlockStoneButtonHandler (E_BLOCK_STONE_BUTTON); constexpr cBlockStoneHandler BlockStoneHandler (E_BLOCK_STONE); constexpr cBlockPressurePlateHandler BlockStonePressurePlateHandler (E_BLOCK_STONE_PRESSURE_PLATE); diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp index 95ee28bff..73065bb14 100644 --- a/src/Items/ItemHandler.cpp +++ b/src/Items/ItemHandler.cpp @@ -121,11 +121,12 @@ namespace constexpr cItemBedHandler ItemBedHandler (E_ITEM_BED); constexpr cDefaultItemHandler ItemBedrockHandler (E_BLOCK_BEDROCK); constexpr cItemSimpleFoodHandler ItemBeetrootHandler (E_ITEM_BEETROOT, cItemHandler::FoodInfo(1, 1.2)); + constexpr cDefaultItemHandler ItemBeetrootsBlockHandler (E_BLOCK_BEETROOTS); constexpr cItemSimpleSeedsHandler ItemBeetrootSeedsHandler (E_ITEM_BEETROOT_SEEDS); constexpr cItemSoupHandler ItemBeetrootSoupHandler (E_ITEM_BEETROOT_SOUP, cItemHandler::FoodInfo(6, 7.2)); - constexpr cDefaultItemHandler ItemBeetrootsBlockHandler (E_BLOCK_BEETROOTS); constexpr cItemBigFlowerHandler ItemBigFlowerHandler (E_BLOCK_BIG_FLOWER); constexpr cItemBoatHandler ItemBirchBoatHandler (E_ITEM_BIRCH_BOAT); + constexpr cDefaultItemHandler ItemBirchDoorBlockHandler (E_BLOCK_BIRCH_DOOR); constexpr cItemDoorHandler ItemBirchDoorHandler (E_ITEM_BIRCH_DOOR); constexpr cItemFenceGateHandler ItemBirchFenceGateHandler (E_BLOCK_BIRCH_FENCE_GATE); constexpr cDefaultItemHandler ItemBirchFenceHandler (E_BLOCK_BIRCH_FENCE); @@ -226,7 +227,6 @@ namespace constexpr cItemSwordHandler ItemDiamondSwordHandler (E_ITEM_DIAMOND_SWORD); constexpr cDefaultItemHandler ItemDirtHandler (E_BLOCK_DIRT); constexpr cItemDropSpenserHandler ItemDispenserHandler (E_BLOCK_DISPENSER); - constexpr cDefaultItemHandler ItemBirchDoorBlockHandler (E_BLOCK_BIRCH_DOOR); constexpr cDefaultItemHandler ItemDoubleOakSlabHandler (E_BLOCK_DOUBLE_WOODEN_SLAB); constexpr cDefaultItemHandler ItemDoubleRedSandstoneSlabHandler (E_BLOCK_DOUBLE_RED_SANDSTONE_SLAB); constexpr cDefaultItemHandler ItemDoubleStoneSlabHandler (E_BLOCK_DOUBLE_STONE_SLAB); @@ -244,18 +244,17 @@ namespace constexpr cItemEnchantingTableHandler ItemEnchantingTableHandler (E_BLOCK_ENCHANTMENT_TABLE); constexpr cDefaultItemHandler ItemEndBricksHandler (E_BLOCK_END_BRICKS); constexpr cItemEndCrystalHandler ItemEndCrystalHandler (E_ITEM_END_CRYSTAL); + constexpr cItemEnderChestHandler ItemEnderChestHandler (E_BLOCK_ENDER_CHEST); + constexpr cItemEnderPearlHandler ItemEnderPearlHandler (E_ITEM_ENDER_PEARL); constexpr cDefaultItemHandler ItemEndGatewayHandler (E_BLOCK_END_GATEWAY); constexpr cDefaultItemHandler ItemEndPortalBlockHandler (E_BLOCK_END_PORTAL); constexpr cItemEndPortalFrameHandler ItemEndPortalFrameHandler (E_BLOCK_END_PORTAL_FRAME); constexpr cDefaultItemHandler ItemEndRodHandler (E_BLOCK_END_ROD); constexpr cDefaultItemHandler ItemEndStoneBlockHandler (E_BLOCK_END_STONE); - constexpr cItemEnderPearlHandler ItemEnderPearlHandler (E_ITEM_ENDER_PEARL); - constexpr cItemEnderChestHandler ItemEnderChestHandler (E_BLOCK_ENDER_CHEST); constexpr cItemEyeOfEnderHandler ItemEyeOfEnderHandler (E_ITEM_EYE_OF_ENDER); constexpr cDefaultItemHandler ItemFarDiscHandler (E_ITEM_FAR_DISC); constexpr cDefaultItemHandler ItemFarmlandHandler (E_BLOCK_FARMLAND); constexpr cDefaultItemHandler ItemFeatherHandler (E_ITEM_FEATHER); - constexpr cDefaultItemHandler ItemOakFenceHandler (E_BLOCK_FENCE); constexpr cDefaultItemHandler ItemFermentedSpiderEyeHandler (E_ITEM_FERMENTED_SPIDER_EYE); constexpr cDefaultItemHandler ItemFireBlockHandler (E_BLOCK_FIRE); constexpr cItemLighterHandler ItemFireChargeHandler (E_ITEM_FIRE_CHARGE); @@ -277,9 +276,6 @@ namespace constexpr cDefaultItemHandler ItemGlowstoneBlockHandler (E_BLOCK_GLOWSTONE); constexpr cDefaultItemHandler ItemGlowstoneDustHandler (E_ITEM_GLOWSTONE_DUST); constexpr cDefaultItemHandler ItemGoldBlockHandler (E_BLOCK_GOLD_BLOCK); - constexpr cDefaultItemHandler ItemGoldHandler (E_ITEM_GOLD); - constexpr cDefaultItemHandler ItemGoldNuggetHandler (E_ITEM_GOLD_NUGGET); - constexpr cDefaultItemHandler ItemGoldOreHandler (E_BLOCK_GOLD_ORE); constexpr cItemGoldenAppleHandler ItemGoldenAppleHandler (E_ITEM_GOLDEN_APPLE); constexpr cItemAxeHandler ItemGoldenAxeHandler (E_ITEM_GOLD_AXE); constexpr cItemArmorHandler ItemGoldenBootsHandler (E_ITEM_GOLD_BOOTS); @@ -292,6 +288,9 @@ namespace constexpr cItemPickaxeHandler ItemGoldenPickaxeHandler (E_ITEM_GOLD_PICKAXE); constexpr cItemShovelHandler ItemGoldenShovelHandler (E_ITEM_GOLD_SHOVEL); constexpr cItemSwordHandler ItemGoldenSwordHandler (E_ITEM_GOLD_SWORD); + constexpr cDefaultItemHandler ItemGoldHandler (E_ITEM_GOLD); + constexpr cDefaultItemHandler ItemGoldNuggetHandler (E_ITEM_GOLD_NUGGET); + constexpr cDefaultItemHandler ItemGoldOreHandler (E_BLOCK_GOLD_ORE); constexpr cDefaultItemHandler ItemGrassBlockHandler (E_BLOCK_GRASS); constexpr cDefaultItemHandler ItemGrassPathHandler (E_BLOCK_GRASS_PATH); constexpr cDefaultItemHandler ItemGravelHandler (E_BLOCK_GRAVEL); @@ -313,6 +312,7 @@ namespace constexpr cDefaultItemHandler ItemInvertedDaylightSensorHandler (E_BLOCK_INVERTED_DAYLIGHT_SENSOR); constexpr cItemAxeHandler ItemIronAxeHandler (E_ITEM_IRON_AXE); constexpr cDefaultItemHandler ItemIronBarsBlockHandler (E_BLOCK_IRON_BARS); + constexpr cDefaultItemHandler ItemIronBlockHandler (E_BLOCK_IRON_BLOCK); constexpr cItemArmorHandler ItemIronBootsHandler (E_ITEM_IRON_BOOTS); constexpr cItemArmorHandler ItemIronChestplateHandler (E_ITEM_IRON_CHESTPLATE); constexpr cDefaultItemHandler ItemIronDoorBlockHandler (E_BLOCK_IRON_DOOR); @@ -328,7 +328,6 @@ namespace constexpr cItemShovelHandler ItemIronShovelHandler (E_ITEM_IRON_SHOVEL); constexpr cItemSwordHandler ItemIronSwordHandler (E_ITEM_IRON_SWORD); constexpr cItemTrapdoorHandler ItemIronTrapdoorHandler (E_BLOCK_IRON_TRAPDOOR); - constexpr cDefaultItemHandler ItemIronBlockHandler (E_BLOCK_IRON_BLOCK); constexpr cItemItemFrameHandler ItemItemFrameHandler (E_ITEM_ITEM_FRAME); constexpr cItemJackOLanternHandler ItemJackOLanternHandler (E_BLOCK_JACK_O_LANTERN); constexpr cDefaultItemHandler ItemJukeboxHandler (E_BLOCK_JUKEBOX); @@ -383,18 +382,18 @@ namespace constexpr cItemSoupHandler ItemMushroomSoupHandler (E_ITEM_MUSHROOM_SOUP, cItemHandler::FoodInfo(6, 7.2)); constexpr cDefaultItemHandler ItemMyceliumHandler (E_BLOCK_MYCELIUM); constexpr cDefaultItemHandler ItemNameTagHandler (E_ITEM_NAME_TAG); - constexpr cDefaultItemHandler ItemNetherBricksHandler (E_BLOCK_NETHER_BRICK); constexpr cDefaultItemHandler ItemNetherBrickFenceHandler (E_BLOCK_NETHER_BRICK_FENCE); constexpr cDefaultItemHandler ItemNetherBrickHandler (E_ITEM_NETHER_BRICK); + constexpr cDefaultItemHandler ItemNetherBricksHandler (E_BLOCK_NETHER_BRICK); constexpr cItemStairsHandler ItemNetherBrickStairsHandler (E_BLOCK_NETHER_BRICK_STAIRS); constexpr cDefaultItemHandler ItemNetherPortalBlockHandler (E_BLOCK_NETHER_PORTAL); constexpr cDefaultItemHandler ItemNetherQuartzHandler (E_ITEM_NETHER_QUARTZ); constexpr cDefaultItemHandler ItemNetherQuartzOreHandler (E_BLOCK_NETHER_QUARTZ_ORE); + constexpr cDefaultItemHandler ItemNetherrackHandler (E_BLOCK_NETHERRACK); constexpr cDefaultItemHandler ItemNetherStarHandler (E_ITEM_NETHER_STAR); constexpr cDefaultItemHandler ItemNetherWartBlockHandler (E_BLOCK_NETHER_WART_BLOCK); - constexpr cDefaultItemHandler ItemNetherWartTechnicalBlockHandler (E_BLOCK_NETHER_WART); constexpr cItemNetherWartHandler ItemNetherWartHandler (E_ITEM_NETHER_WART); - constexpr cDefaultItemHandler ItemNetherrackHandler (E_BLOCK_NETHERRACK); + constexpr cDefaultItemHandler ItemNetherWartTechnicalBlockHandler (E_BLOCK_NETHER_WART); constexpr cItemLeavesHandler ItemNewLeavesHandler (E_BLOCK_NEW_LEAVES); constexpr cItemSidewaysHandler ItemNewLogHandler (E_BLOCK_NEW_LOG); constexpr cDefaultItemHandler ItemNoteBlockHandler (E_BLOCK_NOTE_BLOCK); @@ -403,6 +402,7 @@ namespace constexpr cDefaultItemHandler ItemOakDoorBlockHandler (E_BLOCK_OAK_DOOR); constexpr cItemDoorHandler ItemOakDoorHandler (E_ITEM_WOODEN_DOOR); constexpr cItemFenceGateHandler ItemOakFenceGateHandler (E_BLOCK_OAK_FENCE_GATE); + constexpr cDefaultItemHandler ItemOakFenceHandler (E_BLOCK_FENCE); constexpr cItemSlabHandler ItemOakSlabHandler (E_BLOCK_WOODEN_SLAB); constexpr cItemStairsHandler ItemOakStairsHandler (E_BLOCK_OAK_WOOD_STAIRS); constexpr cItemTrapdoorHandler ItemOakTrapdoorHandler (E_BLOCK_TRAPDOOR); @@ -422,8 +422,8 @@ namespace constexpr cItemPoisonousPotatoHandler ItemPoisonousPotatoHandler (E_ITEM_POISONOUS_POTATO); constexpr cDefaultItemHandler ItemPoppedChorusFruitHandler (E_ITEM_POPPED_CHORUS_FRUIT); constexpr cDefaultItemHandler ItemPoppyHandler (E_BLOCK_FLOWER); - constexpr cItemFoodSeedsHandler ItemPotatoHandler (E_ITEM_POTATO, cItemHandler::FoodInfo(1, 0.6)); constexpr cDefaultItemHandler ItemPotatoesBlockHandler (E_BLOCK_POTATOES); + constexpr cItemFoodSeedsHandler ItemPotatoHandler (E_ITEM_POTATO, cItemHandler::FoodInfo(1, 0.6)); constexpr cItemPotionHandler ItemPotionHandler (E_ITEM_POTION); constexpr cItemRailHandler ItemPoweredRailHandler (E_BLOCK_POWERED_RAIL); constexpr cDefaultItemHandler ItemPrismarineBlockHandler (E_BLOCK_PRISMARINE_BLOCK); @@ -433,18 +433,18 @@ namespace constexpr cItemSimpleFoodHandler ItemPumpkinPieHandler (E_ITEM_PUMPKIN_PIE, cItemHandler::FoodInfo(8, 4.8)); constexpr cItemSimpleSeedsHandler ItemPumpkinSeedsHandler (E_ITEM_PUMPKIN_SEEDS); constexpr cDefaultItemHandler ItemPumpkinStemHandler (E_BLOCK_PUMPKIN_STEM); - constexpr cItemStairsHandler ItemPurpurStairsHandler (E_BLOCK_PURPUR_STAIRS); constexpr cItemGlazedTerracottaHandler ItemPurpleGlazedTerracottaHandler (E_BLOCK_PURPLE_GLAZED_TERRACOTTA); constexpr cDefaultItemHandler ItemPurpleShulkerBoxHandler (E_BLOCK_PURPLE_SHULKER_BOX); constexpr cDefaultItemHandler ItemPurpurBlockHandler (E_BLOCK_PURPUR_BLOCK); constexpr cDefaultItemHandler ItemPurpurDoubleSlabHandler (E_BLOCK_PURPUR_DOUBLE_SLAB); constexpr cDefaultItemHandler ItemPurpurPillarHandler (E_BLOCK_PURPUR_PILLAR); constexpr cItemSlabHandler ItemPurpurSlabHandler (E_BLOCK_PURPUR_SLAB); + constexpr cItemStairsHandler ItemPurpurStairsHandler (E_BLOCK_PURPUR_STAIRS); constexpr cItemQuartzHandler ItemQuartzBlockHandler (E_BLOCK_QUARTZ_BLOCK); constexpr cItemStairsHandler ItemQuartzStairsHandler (E_BLOCK_QUARTZ_STAIRS); constexpr cDefaultItemHandler ItemRabbitHideHandler (E_ITEM_RABBIT_HIDE); - constexpr cItemSoupHandler ItemRabbitStewHandler (E_ITEM_RABBIT_STEW, cItemHandler::FoodInfo(10, 12)); constexpr cDefaultItemHandler ItemRabbitsFootHandler (E_ITEM_RABBITS_FOOT); + constexpr cItemSoupHandler ItemRabbitStewHandler (E_ITEM_RABBIT_STEW, cItemHandler::FoodInfo(10, 12)); constexpr cItemRailHandler ItemRailHandler (E_BLOCK_RAIL); constexpr cItemSimpleFoodHandler ItemRawBeefHandler (E_ITEM_RAW_BEEF, cItemHandler::FoodInfo(3, 1.8)); constexpr cItemRawChickenHandler ItemRawChickenHandler (E_ITEM_RAW_CHICKEN); @@ -463,8 +463,8 @@ namespace constexpr cItemRedstoneDustHandler ItemRedstoneDustHandler (E_ITEM_REDSTONE_DUST); constexpr cDefaultItemHandler ItemRedstoneLampOffHandler (E_BLOCK_REDSTONE_LAMP_OFF); constexpr cDefaultItemHandler ItemRedstoneLampOnHandler (E_BLOCK_REDSTONE_LAMP_ON); - constexpr cDefaultItemHandler ItemRedstoneOreHandler (E_BLOCK_REDSTONE_ORE); constexpr cDefaultItemHandler ItemRedstoneOreGlowingHandler (E_BLOCK_REDSTONE_ORE_GLOWING); + constexpr cDefaultItemHandler ItemRedstoneOreHandler (E_BLOCK_REDSTONE_ORE); constexpr cItemRedstoneRepeaterHandler ItemRedstoneRepeaterHandler (E_ITEM_REDSTONE_REPEATER); constexpr cDefaultItemHandler ItemRedstoneRepeaterOffHandler (E_BLOCK_REDSTONE_REPEATER_OFF); constexpr cDefaultItemHandler ItemRedstoneRepeaterOnHandler (E_BLOCK_REDSTONE_REPEATER_ON); @@ -486,24 +486,23 @@ namespace constexpr cItemSignHandler ItemSignHandler (E_ITEM_SIGN); constexpr cDefaultItemHandler ItemSignPostHandler (E_BLOCK_SIGN_POST); constexpr cDefaultItemHandler ItemSilverfishEggBlockHandler (E_BLOCK_SILVERFISH_EGG); - constexpr cDefaultItemHandler ItemSlimeBlockHandler (E_BLOCK_SLIME_BLOCK); constexpr cDefaultItemHandler ItemSlimeballHandler (E_ITEM_SLIMEBALL); + constexpr cDefaultItemHandler ItemSlimeBlockHandler (E_BLOCK_SLIME_BLOCK); + constexpr cItemSnowballHandler ItemSnowballHandler (E_ITEM_SNOWBALL); constexpr cDefaultItemHandler ItemSnowBlockHandler (E_BLOCK_SNOW_BLOCK); constexpr cItemSnowHandler ItemSnowHandler (E_BLOCK_SNOW); - constexpr cItemSnowballHandler ItemSnowballHandler (E_ITEM_SNOWBALL); constexpr cDefaultItemHandler ItemSoulsandHandler (E_BLOCK_SOULSAND); constexpr cItemSpawnEggHandler ItemSpawnEggHandler (E_ITEM_SPAWN_EGG); + constexpr cDefaultItemHandler ItemSpectralArrowHandler (E_ITEM_SPECTRAL_ARROW); constexpr cItemSpiderEyeHandler ItemSpiderEyeHandler (E_ITEM_SPIDER_EYE); constexpr cItemPotionHandler ItemSplashPotionHandler (E_ITEM_SPLASH_POTION); constexpr cDefaultItemHandler ItemSpongeHandler (E_BLOCK_SPONGE); - constexpr cDefaultItemHandler ItemSpectralArrowHandler (E_ITEM_SPECTRAL_ARROW); constexpr cItemBoatHandler ItemSpruceBoatHandler (E_ITEM_SPRUCE_BOAT); constexpr cDefaultItemHandler ItemSpruceDoorBlockHandler (E_BLOCK_SPRUCE_DOOR); constexpr cItemDoorHandler ItemSpruceDoorHandler (E_ITEM_SPRUCE_DOOR); constexpr cItemFenceGateHandler ItemSpruceFenceGateHandler (E_BLOCK_SPRUCE_FENCE_GATE); constexpr cDefaultItemHandler ItemSpruceFenceHandler (E_BLOCK_SPRUCE_FENCE); constexpr cItemStairsHandler ItemSpruceStairsHandler (E_BLOCK_SPRUCE_WOOD_STAIRS); - constexpr cSimplePlaceableItemHandler ItemStringHandler (E_ITEM_STRING, E_BLOCK_TRIPWIRE); constexpr cDefaultItemHandler ItemStainedGlassHandler (E_BLOCK_STAINED_GLASS); constexpr cDefaultItemHandler ItemStainedGlassPaneHandler (E_BLOCK_STAINED_GLASS_PANE); constexpr cDefaultItemHandler ItemStalDiscHandler (E_ITEM_STAL_DISC); @@ -524,15 +523,16 @@ namespace constexpr cItemSlabHandler ItemStoneSlabHandler (E_BLOCK_STONE_SLAB); constexpr cItemSwordHandler ItemStoneSwordHandler (E_ITEM_STONE_SWORD); constexpr cDefaultItemHandler ItemStradDiscHandler (E_ITEM_STRAD_DISC); + constexpr cSimplePlaceableItemHandler ItemStringHandler (E_ITEM_STRING, E_BLOCK_TRIPWIRE); constexpr cDefaultItemHandler ItemStructureBlockHandler (E_BLOCK_STRUCTURE_BLOCK); constexpr cDefaultItemHandler ItemStructureVoidHandler (E_BLOCK_STRUCTURE_VOID); constexpr cDefaultItemHandler ItemSugarCaneBlockHandler (E_BLOCK_SUGARCANE); constexpr cSimplePlaceableItemHandler ItemSugarCaneHandler (E_ITEM_SUGARCANE, E_BLOCK_SUGARCANE); constexpr cDefaultItemHandler ItemSugarHandler (E_ITEM_SUGAR); - constexpr cDefaultItemHandler ItemTNTHandler (E_BLOCK_TNT); constexpr cDefaultItemHandler ItemTallGrassHandler (E_BLOCK_TALL_GRASS); constexpr cDefaultItemHandler ItemTerracottaHandler (E_BLOCK_TERRACOTTA); constexpr cDefaultItemHandler ItemTippedArrowHandler (E_ITEM_TIPPED_ARROW); + constexpr cDefaultItemHandler ItemTNTHandler (E_BLOCK_TNT); constexpr cDefaultItemHandler ItemTorchBlockHandler (E_BLOCK_TORCH); constexpr cDefaultItemHandler ItemTotemOfUndyingHandler (E_ITEM_TOTEM_OF_UNDYING); constexpr cItemChestHandler ItemTrappedChestHandler (E_BLOCK_TRAPPED_CHEST); @@ -1025,8 +1025,8 @@ const cItemHandler & cItemHandler::For(int a_ItemType) case E_ITEM_WARD_DISC: return ItemWardDiscHandler; case E_ITEM_WATER_BUCKET: return ItemWaterBucketHandler; case E_ITEM_WHEAT: return ItemWheatHandler; - case E_ITEM_WOODEN_DOOR: return ItemOakDoorHandler; case E_ITEM_WOODEN_AXE: return ItemWoodenAxeHandler; + case E_ITEM_WOODEN_DOOR: return ItemOakDoorHandler; case E_ITEM_WOODEN_HOE: return ItemWoodenHoeHandler; case E_ITEM_WOODEN_PICKAXE: return ItemWoodenPickaxeHandler; case E_ITEM_WOODEN_SHOVEL: return ItemWoodenShovelHandler; @@ -1075,7 +1075,7 @@ void cItemHandler::OnPlayerPlace(cPlayer & a_Player, const cItem & a_HeldItem, c { // Tried to place a block into another? // Happens when you place a block aiming at side of block with a torch on it or stem beside it. - a_Player.SendBlocksAround(PlacedPosition.x, PlacedPosition.y, PlacedPosition.z, 2); + a_Player.SendBlocksAround(PlacePosition.x, PlacePosition.y, PlacePosition.z, 2); a_Player.GetInventory().SendEquippedSlot(); return; } |