summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
Diffstat (limited to 'src/Items')
-rw-r--r--src/Items/ItemHandler.cpp46
1 files changed, 23 insertions, 23 deletions
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;
}