diff --git a/src/main/java/com/sk89q/worldedit/blocks/BlockType.java b/src/main/java/com/sk89q/worldedit/blocks/BlockType.java index b4d1111b9..ff01dcfd9 100644 --- a/src/main/java/com/sk89q/worldedit/blocks/BlockType.java +++ b/src/main/java/com/sk89q/worldedit/blocks/BlockType.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.EnumSet; import java.util.Map.Entry; + import com.sk89q.util.StringUtil; /** @@ -151,102 +152,102 @@ public enum BlockType { * Static constructor. */ static { - blockDrops.put(1, 4); - blockDrops.put(2, 3); - blockDrops.put(3, 3); - blockDrops.put(4, 4); - blockDrops.put(5, 5); - blockDrops.put(6, 6); - blockDrops.put(7, -1); - blockDrops.put(12, 12); - blockDrops.put(13, 13); - blockDrops.put(14, 14); - blockDrops.put(15, 15); - blockDrops.put(16, 16); - blockDrops.put(17, 17); - blockDrops.put(18, 18); - blockDrops.put(19, 19); - blockDrops.put(20, 20); // Have to drop glass for //undo - blockDrops.put(21, 21); // Block damage drops not implemented - blockDrops.put(22, 22); - blockDrops.put(23, 23); - blockDrops.put(24, 24); - blockDrops.put(25, 25); - blockDrops.put(26, 355); - blockDrops.put(27, 27); - blockDrops.put(28, 28); - blockDrops.put(30, 30); - blockDrops.put(34, -1); - blockDrops.put(35, 35); - blockDrops.put(36, -1); - blockDrops.put(37, 37); - blockDrops.put(38, 38); - blockDrops.put(39, 39); - blockDrops.put(40, 40); - blockDrops.put(41, 41); - blockDrops.put(42, 42); - blockDrops.put(43, 43); - blockDrops.put(44, 44); - blockDrops.put(45, 45); - blockDrops.put(47, 47); - blockDrops.put(48, 48); - blockDrops.put(49, 49); - blockDrops.put(50, 50); - blockDrops.put(53, 53); - blockDrops.put(54, 54); - blockDrops.put(55, 331); - blockDrops.put(56, 264); - blockDrops.put(57, 57); - blockDrops.put(58, 58); - blockDrops.put(59, 295); - blockDrops.put(60, 60); - blockDrops.put(61, 61); - blockDrops.put(62, 61); - blockDrops.put(63, 323); - blockDrops.put(64, 324); - blockDrops.put(65, 65); - blockDrops.put(66, 66); - blockDrops.put(67, 67); - blockDrops.put(68, 323); - blockDrops.put(69, 69); - blockDrops.put(70, 70); - blockDrops.put(71, 330); - blockDrops.put(72, 72); - blockDrops.put(73, 331); - blockDrops.put(74, 331); - blockDrops.put(75, 76); - blockDrops.put(76, 76); - blockDrops.put(77, 77); - blockDrops.put(78, 332); - blockDrops.put(80, 80); - blockDrops.put(81, 81); - blockDrops.put(82, 82); - blockDrops.put(83, 338); - blockDrops.put(84, 84); - blockDrops.put(85, 85); - blockDrops.put(86, 86); - blockDrops.put(87, 87); - blockDrops.put(88, 88); - blockDrops.put(89, 348); - blockDrops.put(91, 91); - blockDrops.put(92, 354); - blockDrops.put(93, 356); - blockDrops.put(94, 356); - blockDrops.put(95, 95); - blockDrops.put(96, 96); - blockDrops.put(97, -1); - blockDrops.put(98, 98); - blockDrops.put(99, 99); - blockDrops.put(100, 100); - blockDrops.put(101, 101); - blockDrops.put(102, 102); - blockDrops.put(103, 103); - blockDrops.put(104, 104); - blockDrops.put(105, 105); - blockDrops.put(106, -1); - blockDrops.put(107, 107); - blockDrops.put(108, 45); - blockDrops.put(109, 98); + blockDrops.put(BlockID.STONE, BlockID.COBBLESTONE); + blockDrops.put(BlockID.GRASS, BlockID.DIRT); + blockDrops.put(BlockID.DIRT, BlockID.DIRT); + blockDrops.put(BlockID.COBBLESTONE, BlockID.COBBLESTONE); + blockDrops.put(BlockID.WOOD, BlockID.WOOD); + blockDrops.put(BlockID.SAPLING, BlockID.SAPLING); + blockDrops.put(BlockID.BEDROCK, -1); + blockDrops.put(BlockID.SAND, BlockID.SAND); + blockDrops.put(BlockID.GRAVEL, BlockID.GRAVEL); + blockDrops.put(BlockID.GOLD_ORE, BlockID.GOLD_ORE); + blockDrops.put(BlockID.IRON_ORE, BlockID.IRON_ORE); + blockDrops.put(BlockID.COAL_ORE, BlockID.COAL_ORE); + blockDrops.put(BlockID.LOG, BlockID.LOG); + blockDrops.put(BlockID.LEAVES, BlockID.LEAVES); + blockDrops.put(BlockID.SPONGE, BlockID.SPONGE); + blockDrops.put(BlockID.GLASS, BlockID.GLASS); // Have to drop glass for //undo + blockDrops.put(BlockID.LAPIS_LAZULI_ORE, BlockID.LAPIS_LAZULI_ORE); // Block damage drops not implemented + blockDrops.put(BlockID.LAPIS_LAZULI_BLOCK, BlockID.LAPIS_LAZULI_BLOCK); + blockDrops.put(BlockID.DISPENSER, BlockID.DISPENSER); + blockDrops.put(BlockID.SANDSTONE, BlockID.SANDSTONE); + blockDrops.put(BlockID.NOTE_BLOCK, BlockID.NOTE_BLOCK); + blockDrops.put(BlockID.BED, ItemType.BED_ITEM.getID()); + blockDrops.put(BlockID.POWERED_RAIL, BlockID.POWERED_RAIL); + blockDrops.put(BlockID.DETECTOR_RAIL, BlockID.DETECTOR_RAIL); + blockDrops.put(BlockID.WEB, BlockID.WEB); + blockDrops.put(BlockID.PISTON_EXTENSION, -1); + blockDrops.put(BlockID.CLOTH, BlockID.CLOTH); + blockDrops.put(BlockID.PISTON_MOVING_PIECE, -1); + blockDrops.put(BlockID.YELLOW_FLOWER, BlockID.YELLOW_FLOWER); + blockDrops.put(BlockID.RED_FLOWER, BlockID.RED_FLOWER); + blockDrops.put(BlockID.BROWN_MUSHROOM, BlockID.BROWN_MUSHROOM); + blockDrops.put(BlockID.RED_MUSHROOM, BlockID.RED_MUSHROOM); + blockDrops.put(BlockID.GOLD_BLOCK, BlockID.GOLD_BLOCK); + blockDrops.put(BlockID.IRON_BLOCK, BlockID.IRON_BLOCK); + blockDrops.put(BlockID.DOUBLE_STEP, BlockID.DOUBLE_STEP); + blockDrops.put(BlockID.STEP, BlockID.STEP); + blockDrops.put(BlockID.BRICK, BlockID.BRICK); + blockDrops.put(BlockID.BOOKCASE, BlockID.BOOKCASE); + blockDrops.put(BlockID.MOSSY_COBBLESTONE, BlockID.MOSSY_COBBLESTONE); + blockDrops.put(BlockID.OBSIDIAN, BlockID.OBSIDIAN); + blockDrops.put(BlockID.TORCH, BlockID.TORCH); + blockDrops.put(BlockID.WOODEN_STAIRS, BlockID.WOODEN_STAIRS); + blockDrops.put(BlockID.CHEST, BlockID.CHEST); + blockDrops.put(BlockID.REDSTONE_WIRE, ItemType.REDSTONE_DUST.getID()); + blockDrops.put(BlockID.DIAMOND_ORE, ItemType.DIAMOND.getID()); + blockDrops.put(BlockID.DIAMOND_BLOCK, BlockID.DIAMOND_BLOCK); + blockDrops.put(BlockID.WORKBENCH, BlockID.WORKBENCH); + blockDrops.put(BlockID.CROPS, ItemType.SEEDS.getID()); + blockDrops.put(BlockID.SOIL, BlockID.SOIL); + blockDrops.put(BlockID.FURNACE, BlockID.FURNACE); + blockDrops.put(BlockID.BURNING_FURNACE, BlockID.FURNACE); + blockDrops.put(BlockID.SIGN_POST, ItemType.SIGN.getID()); + blockDrops.put(BlockID.WOODEN_DOOR, ItemType.WOODEN_DOOR_ITEM.getID()); + blockDrops.put(BlockID.LADDER, BlockID.LADDER); + blockDrops.put(BlockID.MINECART_TRACKS, BlockID.MINECART_TRACKS); + blockDrops.put(BlockID.COBBLESTONE_STAIRS, BlockID.COBBLESTONE_STAIRS); + blockDrops.put(BlockID.WALL_SIGN, ItemType.SIGN.getID()); + blockDrops.put(BlockID.LEVER, BlockID.LEVER); + blockDrops.put(BlockID.STONE_PRESSURE_PLATE, BlockID.STONE_PRESSURE_PLATE); + blockDrops.put(BlockID.IRON_DOOR, ItemType.IRON_DOOR_ITEM.getID()); + blockDrops.put(BlockID.WOODEN_PRESSURE_PLATE, BlockID.WOODEN_PRESSURE_PLATE); + blockDrops.put(BlockID.REDSTONE_ORE, ItemType.REDSTONE_DUST.getID()); + blockDrops.put(BlockID.GLOWING_REDSTONE_ORE, ItemType.REDSTONE_DUST.getID()); + blockDrops.put(BlockID.REDSTONE_TORCH_OFF, BlockID.REDSTONE_TORCH_ON); + blockDrops.put(BlockID.REDSTONE_TORCH_ON, BlockID.REDSTONE_TORCH_ON); + blockDrops.put(BlockID.STONE_BUTTON, BlockID.STONE_BUTTON); + blockDrops.put(BlockID.SNOW, ItemType.SNOWBALL.getID()); + blockDrops.put(BlockID.ICE, BlockID.ICE); + blockDrops.put(BlockID.SNOW_BLOCK, BlockID.SNOW_BLOCK); + blockDrops.put(BlockID.CLAY, BlockID.CLAY); + blockDrops.put(BlockID.REED, ItemType.SUGAR_CANE_ITEM.getID()); + blockDrops.put(BlockID.JUKEBOX, BlockID.JUKEBOX); + blockDrops.put(BlockID.FENCE, BlockID.FENCE); + blockDrops.put(BlockID.PUMPKIN, BlockID.PUMPKIN); + blockDrops.put(BlockID.NETHERRACK, BlockID.NETHERRACK); + blockDrops.put(BlockID.SLOW_SAND, BlockID.SLOW_SAND); + blockDrops.put(BlockID.LIGHTSTONE, ItemType.LIGHTSTONE_DUST.getID()); + blockDrops.put(BlockID.JACKOLANTERN, BlockID.JACKOLANTERN); + blockDrops.put(BlockID.CAKE_BLOCK, ItemType.CAKE_ITEM.getID()); + blockDrops.put(BlockID.REDSTONE_REPEATER_OFF, ItemType.REDSTONE_REPEATER.getID()); + blockDrops.put(BlockID.REDSTONE_REPEATER_ON, ItemType.REDSTONE_REPEATER.getID()); + blockDrops.put(BlockID.LOCKED_CHEST, BlockID.LOCKED_CHEST); + blockDrops.put(BlockID.TRAP_DOOR, BlockID.TRAP_DOOR); + blockDrops.put(BlockID.SILVERFISH_BLOCK, -1); + blockDrops.put(BlockID.STONE_BRICK, BlockID.STONE_BRICK); + blockDrops.put(BlockID.BROWN_MUSHROOM_CAP, BlockID.BROWN_MUSHROOM_CAP); // the wiki has the 2 mushroom caps the other way round + blockDrops.put(BlockID.RED_MUSHROOM_CAP, BlockID.RED_MUSHROOM_CAP); + blockDrops.put(BlockID.IRON_BARS, BlockID.IRON_BARS); + blockDrops.put(BlockID.GLASS_PANE, BlockID.GLASS_PANE); + blockDrops.put(BlockID.MELON_BLOCK, BlockID.MELON_BLOCK); + blockDrops.put(BlockID.PUMPKIN_STEM, BlockID.PUMPKIN_STEM); + blockDrops.put(BlockID.MELON_STEM, BlockID.MELON_STEM); + blockDrops.put(BlockID.VINE, -1); + blockDrops.put(BlockID.FENCE_GATE, BlockID.FENCE_GATE); + blockDrops.put(BlockID.BRICK_STAIRS, BlockID.BRICK); + blockDrops.put(BlockID.STONE_BRICK_STAIRS, BlockID.STONE_BRICK); } /**