Skip to content

Instantly share code, notes, and snippets.

@JabDoesThings
Last active May 13, 2018 23:16
Show Gist options
  • Save JabDoesThings/f833f4ebf064219f648caf6c9222c938 to your computer and use it in GitHub Desktop.
Save JabDoesThings/f833f4ebf064219f648caf6c9222c938 to your computer and use it in GitHub Desktop.
This utility helps with locating Minecraft Materials using both Bukkit's identification for Materials and the canonical ID's used to give items in MineCraft.
// Copyright (c) 2018, Joshua Edwards (Jab)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of the <organization> nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package jab.util;
import java.util.HashMap;
import java.util.Map;
import org.bukkit.Material;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import static org.bukkit.Material.*;
/**
* This utility helps with locating Minecraft Materials using both Bukkit's identification for
* Materials and the canonical ID's used to give items in MineCraft.
*
* <ul>
* Notes:
* <li>Blocks sharing identical names with items will be the MineCraft name with the extension
* "_block"
* <li>All registered names will be lowercase, and sending String IDs with spaces will be
* converted to underscores automatically.
* </ul>
*
* Here's a useful site to identify materials with their respective IDs.
* https://minecraft-ids.grahamedgecombe.com/
*
* @author Jab
*/
public class MaterialHelper {
private static Map<Integer, Material> mapIDs;
private static Map<String, Material> mapNames;
/**
* @param source The source string to deserialize.
* @return Returns the material type represented by the source source given.
* @throws NullPointerException Thrown if the source given is null.
*/
@Nullable
public static Material getMaterial(@NotNull String source) {
if (source.isEmpty()) {
return null;
}
source = source.toLowerCase().trim().replaceAll(" ", "_");
Material returned = mapNames.get(source);
if (returned == null) {
try {
int id = Integer.parseInt(source);
returned = getMaterial(id);
} catch (NumberFormatException e) {
// Just return null.
}
}
return returned;
}
/**
* @param id The numerical ID to identify the material to return.
* @return Returns the material type represented by the source source given.
*/
@Nullable
public static Material getMaterial(int id) {
return mapIDs.get(id);
}
static {
// Create the map for old IDs. This is a manual list of IDs. The reason for having a separate
// list of IDs for Materials is due in part to the planned removal of Material IDs in the 1.13
// update to MineCraft. This is to keep reference to deprecated IDs for future versions.
//
// (NOTE: This list may also need to be updated if any future update occurs which adds new
// Materials)
mapIDs = new HashMap<>();
mapIDs.put(0, AIR);
mapIDs.put(1, STONE);
mapIDs.put(2, GRASS);
mapIDs.put(3, DIRT);
mapIDs.put(4, COBBLESTONE);
mapIDs.put(5, WOOD);
mapIDs.put(6, SAPLING);
mapIDs.put(7, BEDROCK);
mapIDs.put(8, WATER);
mapIDs.put(9, STATIONARY_WATER);
mapIDs.put(10, LAVA);
mapIDs.put(11, STATIONARY_LAVA);
mapIDs.put(12, SAND);
mapIDs.put(13, GRAVEL);
mapIDs.put(14, GOLD_ORE);
mapIDs.put(15, IRON_ORE);
mapIDs.put(16, COAL_ORE);
mapIDs.put(17, LOG);
mapIDs.put(18, LEAVES);
mapIDs.put(19, SPONGE);
mapIDs.put(20, GLASS);
mapIDs.put(21, LAPIS_ORE);
mapIDs.put(22, LAPIS_BLOCK);
mapIDs.put(23, DISPENSER);
mapIDs.put(24, SANDSTONE);
mapIDs.put(25, NOTE_BLOCK);
mapIDs.put(26, BED_BLOCK);
mapIDs.put(27, POWERED_RAIL);
mapIDs.put(28, DETECTOR_RAIL);
mapIDs.put(29, PISTON_STICKY_BASE);
mapIDs.put(30, WEB);
mapIDs.put(31, LONG_GRASS);
mapIDs.put(32, DEAD_BUSH);
mapIDs.put(33, PISTON_BASE);
mapIDs.put(34, PISTON_EXTENSION);
mapIDs.put(35, WOOL);
mapIDs.put(36, PISTON_MOVING_PIECE);
mapIDs.put(37, YELLOW_FLOWER);
mapIDs.put(38, RED_ROSE);
mapIDs.put(39, BROWN_MUSHROOM);
mapIDs.put(40, RED_MUSHROOM);
mapIDs.put(41, GOLD_BLOCK);
mapIDs.put(42, IRON_BLOCK);
mapIDs.put(43, DOUBLE_STEP);
mapIDs.put(44, STEP);
mapIDs.put(45, BRICK);
mapIDs.put(46, TNT);
mapIDs.put(47, BOOKSHELF);
mapIDs.put(48, MOSSY_COBBLESTONE);
mapIDs.put(49, OBSIDIAN);
mapIDs.put(50, TORCH);
mapIDs.put(51, FIRE);
mapIDs.put(52, MOB_SPAWNER);
mapIDs.put(53, WOOD_STAIRS);
mapIDs.put(54, CHEST);
mapIDs.put(55, REDSTONE_WIRE);
mapIDs.put(56, DIAMOND_ORE);
mapIDs.put(57, DIAMOND_BLOCK);
mapIDs.put(58, WORKBENCH);
mapIDs.put(59, CROPS);
mapIDs.put(60, SOIL);
mapIDs.put(61, FURNACE);
mapIDs.put(62, BURNING_FURNACE);
mapIDs.put(63, SIGN_POST);
mapIDs.put(64, WOODEN_DOOR);
mapIDs.put(65, LADDER);
mapIDs.put(66, RAILS);
mapIDs.put(67, COBBLESTONE_STAIRS);
mapIDs.put(68, WALL_SIGN);
mapIDs.put(69, LEVER);
mapIDs.put(70, STONE_PLATE);
mapIDs.put(71, IRON_DOOR_BLOCK);
mapIDs.put(72, WOOD_PLATE);
mapIDs.put(73, REDSTONE_ORE);
mapIDs.put(74, GLOWING_REDSTONE_ORE);
mapIDs.put(75, REDSTONE_TORCH_OFF);
mapIDs.put(76, REDSTONE_TORCH_ON);
mapIDs.put(77, STONE_BUTTON);
mapIDs.put(78, SNOW);
mapIDs.put(79, ICE);
mapIDs.put(80, SNOW_BLOCK);
mapIDs.put(81, CACTUS);
mapIDs.put(82, CLAY);
mapIDs.put(83, SUGAR_CANE_BLOCK);
mapIDs.put(84, JUKEBOX);
mapIDs.put(85, FENCE);
mapIDs.put(86, PUMPKIN);
mapIDs.put(87, NETHERRACK);
mapIDs.put(88, SOUL_SAND);
mapIDs.put(89, GLOWSTONE);
mapIDs.put(90, PORTAL);
mapIDs.put(91, JACK_O_LANTERN);
mapIDs.put(92, CAKE_BLOCK);
mapIDs.put(93, DIODE_BLOCK_OFF);
mapIDs.put(94, DIODE_BLOCK_ON);
mapIDs.put(95, STAINED_GLASS);
mapIDs.put(96, TRAP_DOOR);
mapIDs.put(97, MONSTER_EGGS);
mapIDs.put(98, SMOOTH_BRICK);
mapIDs.put(99, HUGE_MUSHROOM_1);
mapIDs.put(100, HUGE_MUSHROOM_2);
mapIDs.put(101, IRON_FENCE);
mapIDs.put(102, THIN_GLASS);
mapIDs.put(103, MELON_BLOCK);
mapIDs.put(104, PUMPKIN_STEM);
mapIDs.put(105, MELON_STEM);
mapIDs.put(106, VINE);
mapIDs.put(107, FENCE_GATE);
mapIDs.put(108, BRICK_STAIRS);
mapIDs.put(109, SMOOTH_STAIRS);
mapIDs.put(110, MYCEL);
mapIDs.put(111, WATER_LILY);
mapIDs.put(112, NETHER_BRICK);
mapIDs.put(113, NETHER_FENCE);
mapIDs.put(114, NETHER_BRICK_STAIRS);
mapIDs.put(115, NETHER_WARTS);
mapIDs.put(116, ENCHANTMENT_TABLE);
mapIDs.put(117, BREWING_STAND);
mapIDs.put(118, CAULDRON);
mapIDs.put(119, ENDER_PORTAL);
mapIDs.put(120, ENDER_PORTAL_FRAME);
mapIDs.put(121, ENDER_STONE);
mapIDs.put(122, DRAGON_EGG);
mapIDs.put(123, REDSTONE_LAMP_OFF);
mapIDs.put(124, REDSTONE_LAMP_ON);
mapIDs.put(125, WOOD_DOUBLE_STEP);
mapIDs.put(126, WOOD_STEP);
mapIDs.put(127, COCOA);
mapIDs.put(128, SANDSTONE_STAIRS);
mapIDs.put(129, EMERALD_ORE);
mapIDs.put(130, ENDER_CHEST);
mapIDs.put(131, TRIPWIRE_HOOK);
mapIDs.put(132, TRIPWIRE);
mapIDs.put(133, EMERALD_BLOCK);
mapIDs.put(134, SPRUCE_WOOD_STAIRS);
mapIDs.put(135, BIRCH_WOOD_STAIRS);
mapIDs.put(136, JUNGLE_WOOD_STAIRS);
mapIDs.put(137, COMMAND);
mapIDs.put(138, BEACON);
mapIDs.put(139, COBBLE_WALL);
mapIDs.put(140, FLOWER_POT);
mapIDs.put(141, CARROT);
mapIDs.put(142, POTATO);
mapIDs.put(143, WOOD_BUTTON);
mapIDs.put(144, SKULL);
mapIDs.put(145, ANVIL);
mapIDs.put(146, TRAPPED_CHEST);
mapIDs.put(147, GOLD_PLATE);
mapIDs.put(148, IRON_PLATE);
mapIDs.put(149, REDSTONE_COMPARATOR_OFF);
mapIDs.put(150, REDSTONE_COMPARATOR_ON);
mapIDs.put(151, DAYLIGHT_DETECTOR);
mapIDs.put(152, REDSTONE_BLOCK);
mapIDs.put(153, QUARTZ_ORE);
mapIDs.put(154, HOPPER);
mapIDs.put(155, QUARTZ_BLOCK);
mapIDs.put(156, QUARTZ_STAIRS);
mapIDs.put(157, ACTIVATOR_RAIL);
mapIDs.put(158, DROPPER);
mapIDs.put(159, STAINED_CLAY);
mapIDs.put(160, STAINED_GLASS_PANE);
mapIDs.put(161, LEAVES_2);
mapIDs.put(162, LOG_2);
mapIDs.put(163, ACACIA_STAIRS);
mapIDs.put(164, DARK_OAK_STAIRS);
mapIDs.put(165, SLIME_BLOCK);
mapIDs.put(166, BARRIER);
mapIDs.put(167, IRON_TRAPDOOR);
mapIDs.put(168, PRISMARINE);
mapIDs.put(169, SEA_LANTERN);
mapIDs.put(170, HAY_BLOCK);
mapIDs.put(171, CARPET);
mapIDs.put(172, HARD_CLAY);
mapIDs.put(173, COAL_BLOCK);
mapIDs.put(174, PACKED_ICE);
mapIDs.put(175, DOUBLE_PLANT);
mapIDs.put(176, STANDING_BANNER);
mapIDs.put(177, WALL_BANNER);
mapIDs.put(178, DAYLIGHT_DETECTOR_INVERTED);
mapIDs.put(179, RED_SANDSTONE);
mapIDs.put(180, RED_SANDSTONE_STAIRS);
mapIDs.put(181, DOUBLE_STONE_SLAB2);
mapIDs.put(182, STONE_SLAB2);
mapIDs.put(183, SPRUCE_FENCE_GATE);
mapIDs.put(184, BIRCH_FENCE_GATE);
mapIDs.put(185, JUNGLE_FENCE_GATE);
mapIDs.put(186, DARK_OAK_FENCE_GATE);
mapIDs.put(187, ACACIA_FENCE_GATE);
mapIDs.put(188, SPRUCE_FENCE);
mapIDs.put(189, BIRCH_FENCE);
mapIDs.put(190, JUNGLE_FENCE);
mapIDs.put(191, DARK_OAK_FENCE);
mapIDs.put(192, ACACIA_FENCE);
mapIDs.put(193, SPRUCE_DOOR);
mapIDs.put(194, BIRCH_DOOR);
mapIDs.put(195, JUNGLE_DOOR);
mapIDs.put(196, ACACIA_DOOR);
mapIDs.put(197, DARK_OAK_DOOR);
mapIDs.put(198, END_ROD);
mapIDs.put(199, CHORUS_PLANT);
mapIDs.put(200, CHORUS_FLOWER);
mapIDs.put(201, PURPUR_BLOCK);
mapIDs.put(202, PURPUR_PILLAR);
mapIDs.put(203, PURPUR_STAIRS);
mapIDs.put(204, PURPUR_DOUBLE_SLAB);
mapIDs.put(205, PURPUR_SLAB);
mapIDs.put(206, END_BRICKS);
mapIDs.put(207, BEETROOT_BLOCK);
mapIDs.put(208, GRASS_PATH);
mapIDs.put(209, END_GATEWAY);
mapIDs.put(210, COMMAND_REPEATING);
mapIDs.put(211, COMMAND_CHAIN);
mapIDs.put(212, FROSTED_ICE);
mapIDs.put(213, MAGMA);
mapIDs.put(214, NETHER_WART_BLOCK);
mapIDs.put(215, RED_NETHER_BRICK);
mapIDs.put(216, BONE_BLOCK);
mapIDs.put(217, STRUCTURE_VOID);
mapIDs.put(218, OBSERVER);
mapIDs.put(219, WHITE_SHULKER_BOX);
mapIDs.put(220, ORANGE_SHULKER_BOX);
mapIDs.put(221, MAGENTA_SHULKER_BOX);
mapIDs.put(222, LIGHT_BLUE_SHULKER_BOX);
mapIDs.put(223, YELLOW_SHULKER_BOX);
mapIDs.put(224, LIME_SHULKER_BOX);
mapIDs.put(225, PINK_SHULKER_BOX);
mapIDs.put(226, GRAY_SHULKER_BOX);
mapIDs.put(227, SILVER_SHULKER_BOX);
mapIDs.put(228, CYAN_SHULKER_BOX);
mapIDs.put(229, PURPLE_SHULKER_BOX);
mapIDs.put(230, BLUE_SHULKER_BOX);
mapIDs.put(231, BROWN_SHULKER_BOX);
mapIDs.put(232, GREEN_SHULKER_BOX);
mapIDs.put(233, RED_SHULKER_BOX);
mapIDs.put(234, BLACK_SHULKER_BOX);
mapIDs.put(235, WHITE_GLAZED_TERRACOTTA);
mapIDs.put(236, ORANGE_GLAZED_TERRACOTTA);
mapIDs.put(237, MAGENTA_GLAZED_TERRACOTTA);
mapIDs.put(238, LIGHT_BLUE_GLAZED_TERRACOTTA);
mapIDs.put(239, YELLOW_GLAZED_TERRACOTTA);
mapIDs.put(240, LIME_GLAZED_TERRACOTTA);
mapIDs.put(241, PINK_GLAZED_TERRACOTTA);
mapIDs.put(242, GRAY_GLAZED_TERRACOTTA);
mapIDs.put(243, SILVER_GLAZED_TERRACOTTA);
mapIDs.put(244, CYAN_GLAZED_TERRACOTTA);
mapIDs.put(245, PURPLE_GLAZED_TERRACOTTA);
mapIDs.put(246, BLUE_GLAZED_TERRACOTTA);
mapIDs.put(247, BROWN_GLAZED_TERRACOTTA);
mapIDs.put(248, GREEN_GLAZED_TERRACOTTA);
mapIDs.put(249, RED_GLAZED_TERRACOTTA);
mapIDs.put(250, BLACK_GLAZED_TERRACOTTA);
mapIDs.put(251, CONCRETE);
mapIDs.put(252, CONCRETE_POWDER);
mapIDs.put(255, STRUCTURE_BLOCK);
mapIDs.put(256, IRON_SPADE);
mapIDs.put(257, IRON_PICKAXE);
mapIDs.put(258, IRON_AXE);
mapIDs.put(259, FLINT_AND_STEEL);
mapIDs.put(260, APPLE);
mapIDs.put(261, BOW);
mapIDs.put(262, ARROW);
mapIDs.put(263, COAL);
mapIDs.put(264, DIAMOND);
mapIDs.put(265, IRON_INGOT);
mapIDs.put(266, GOLD_INGOT);
mapIDs.put(267, IRON_SWORD);
mapIDs.put(268, WOOD_SWORD);
mapIDs.put(269, WOOD_SPADE);
mapIDs.put(270, WOOD_PICKAXE);
mapIDs.put(271, WOOD_AXE);
mapIDs.put(272, STONE_SWORD);
mapIDs.put(273, STONE_SPADE);
mapIDs.put(274, STONE_PICKAXE);
mapIDs.put(275, STONE_AXE);
mapIDs.put(276, DIAMOND_SWORD);
mapIDs.put(277, DIAMOND_SPADE);
mapIDs.put(278, DIAMOND_PICKAXE);
mapIDs.put(279, DIAMOND_AXE);
mapIDs.put(280, STICK);
mapIDs.put(281, BOWL);
mapIDs.put(282, MUSHROOM_SOUP);
mapIDs.put(283, GOLD_SWORD);
mapIDs.put(284, GOLD_SPADE);
mapIDs.put(285, GOLD_PICKAXE);
mapIDs.put(286, GOLD_AXE);
mapIDs.put(287, STRING);
mapIDs.put(288, FEATHER);
mapIDs.put(289, SULPHUR);
mapIDs.put(290, WOOD_HOE);
mapIDs.put(291, STONE_HOE);
mapIDs.put(292, IRON_HOE);
mapIDs.put(293, DIAMOND_HOE);
mapIDs.put(294, GOLD_HOE);
mapIDs.put(295, SEEDS);
mapIDs.put(296, WHEAT);
mapIDs.put(297, BREAD);
mapIDs.put(298, LEATHER_HELMET);
mapIDs.put(299, LEATHER_CHESTPLATE);
mapIDs.put(300, LEATHER_LEGGINGS);
mapIDs.put(301, LEATHER_BOOTS);
mapIDs.put(302, CHAINMAIL_HELMET);
mapIDs.put(303, CHAINMAIL_CHESTPLATE);
mapIDs.put(304, CHAINMAIL_LEGGINGS);
mapIDs.put(305, CHAINMAIL_BOOTS);
mapIDs.put(306, IRON_HELMET);
mapIDs.put(307, IRON_CHESTPLATE);
mapIDs.put(308, IRON_LEGGINGS);
mapIDs.put(309, IRON_BOOTS);
mapIDs.put(310, DIAMOND_HELMET);
mapIDs.put(311, DIAMOND_CHESTPLATE);
mapIDs.put(312, DIAMOND_LEGGINGS);
mapIDs.put(313, DIAMOND_BOOTS);
mapIDs.put(314, GOLD_HELMET);
mapIDs.put(315, GOLD_CHESTPLATE);
mapIDs.put(316, GOLD_LEGGINGS);
mapIDs.put(317, GOLD_BOOTS);
mapIDs.put(318, FLINT);
mapIDs.put(319, PORK);
mapIDs.put(320, GRILLED_PORK);
mapIDs.put(321, PAINTING);
mapIDs.put(322, GOLDEN_APPLE);
mapIDs.put(323, SIGN);
mapIDs.put(324, WOOD_DOOR);
mapIDs.put(325, BUCKET);
mapIDs.put(326, WATER_BUCKET);
mapIDs.put(327, LAVA_BUCKET);
mapIDs.put(328, MINECART);
mapIDs.put(329, SADDLE);
mapIDs.put(330, IRON_DOOR);
mapIDs.put(331, REDSTONE);
mapIDs.put(332, SNOW_BALL);
mapIDs.put(333, BOAT);
mapIDs.put(334, LEATHER);
mapIDs.put(335, MILK_BUCKET);
mapIDs.put(336, CLAY_BRICK);
mapIDs.put(337, CLAY_BALL);
mapIDs.put(338, SUGAR_CANE);
mapIDs.put(339, PAPER);
mapIDs.put(340, BOOK);
mapIDs.put(341, SLIME_BALL);
mapIDs.put(342, STORAGE_MINECART);
mapIDs.put(343, POWERED_MINECART);
mapIDs.put(344, EGG);
mapIDs.put(345, COMPASS);
mapIDs.put(346, FISHING_ROD);
mapIDs.put(347, WATCH);
mapIDs.put(348, GLOWSTONE_DUST);
mapIDs.put(349, RAW_FISH);
mapIDs.put(350, COOKED_FISH);
mapIDs.put(351, INK_SACK);
mapIDs.put(352, BONE);
mapIDs.put(353, SUGAR);
mapIDs.put(354, CAKE);
mapIDs.put(355, BED);
mapIDs.put(356, DIODE);
mapIDs.put(357, COOKIE);
mapIDs.put(358, MAP);
mapIDs.put(359, SHEARS);
mapIDs.put(360, MELON);
mapIDs.put(361, PUMPKIN_SEEDS);
mapIDs.put(362, MELON_SEEDS);
mapIDs.put(363, RAW_BEEF);
mapIDs.put(364, COOKED_BEEF);
mapIDs.put(365, RAW_CHICKEN);
mapIDs.put(366, COOKED_CHICKEN);
mapIDs.put(367, ROTTEN_FLESH);
mapIDs.put(368, ENDER_PEARL);
mapIDs.put(369, BLAZE_ROD);
mapIDs.put(370, GHAST_TEAR);
mapIDs.put(371, GOLD_NUGGET);
mapIDs.put(372, NETHER_STALK);
mapIDs.put(373, POTION);
mapIDs.put(374, GLASS_BOTTLE);
mapIDs.put(375, SPIDER_EYE);
mapIDs.put(376, FERMENTED_SPIDER_EYE);
mapIDs.put(377, BLAZE_POWDER);
mapIDs.put(378, MAGMA_CREAM);
mapIDs.put(379, BREWING_STAND_ITEM);
mapIDs.put(380, CAULDRON_ITEM);
mapIDs.put(381, EYE_OF_ENDER);
mapIDs.put(382, SPECKLED_MELON);
mapIDs.put(383, MONSTER_EGG);
mapIDs.put(384, EXP_BOTTLE);
mapIDs.put(385, FIREBALL);
mapIDs.put(386, BOOK_AND_QUILL);
mapIDs.put(387, WRITTEN_BOOK);
mapIDs.put(388, EMERALD);
mapIDs.put(389, ITEM_FRAME);
mapIDs.put(390, FLOWER_POT_ITEM);
mapIDs.put(391, CARROT_ITEM);
mapIDs.put(392, POTATO_ITEM);
mapIDs.put(393, BAKED_POTATO);
mapIDs.put(394, POISONOUS_POTATO);
mapIDs.put(395, EMPTY_MAP);
mapIDs.put(396, GOLDEN_CARROT);
mapIDs.put(397, SKULL_ITEM);
mapIDs.put(398, CARROT_STICK);
mapIDs.put(399, NETHER_STAR);
mapIDs.put(400, PUMPKIN_PIE);
mapIDs.put(401, FIREWORK);
mapIDs.put(402, FIREWORK_CHARGE);
mapIDs.put(403, ENCHANTED_BOOK);
mapIDs.put(404, REDSTONE_COMPARATOR);
mapIDs.put(405, NETHER_BRICK_ITEM);
mapIDs.put(406, QUARTZ);
mapIDs.put(407, EXPLOSIVE_MINECART);
mapIDs.put(408, HOPPER_MINECART);
mapIDs.put(409, PRISMARINE_SHARD);
mapIDs.put(410, PRISMARINE_CRYSTALS);
mapIDs.put(411, RABBIT);
mapIDs.put(412, COOKED_RABBIT);
mapIDs.put(413, RABBIT_STEW);
mapIDs.put(414, RABBIT_FOOT);
mapIDs.put(415, RABBIT_HIDE);
mapIDs.put(416, ARMOR_STAND);
mapIDs.put(417, IRON_BARDING);
mapIDs.put(418, GOLD_BARDING);
mapIDs.put(419, DIAMOND_BARDING);
mapIDs.put(420, LEASH);
mapIDs.put(421, NAME_TAG);
mapIDs.put(422, COMMAND_MINECART);
mapIDs.put(423, MUTTON);
mapIDs.put(424, COOKED_MUTTON);
mapIDs.put(425, BANNER);
mapIDs.put(426, END_CRYSTAL);
mapIDs.put(427, SPRUCE_DOOR_ITEM);
mapIDs.put(428, BIRCH_DOOR_ITEM);
mapIDs.put(429, JUNGLE_DOOR_ITEM);
mapIDs.put(430, ACACIA_DOOR_ITEM);
mapIDs.put(431, DARK_OAK_DOOR_ITEM);
mapIDs.put(432, CHORUS_FRUIT);
mapIDs.put(433, CHORUS_FRUIT_POPPED);
mapIDs.put(434, BEETROOT);
mapIDs.put(435, BEETROOT_SEEDS);
mapIDs.put(436, BEETROOT_SOUP);
mapIDs.put(437, DRAGONS_BREATH);
mapIDs.put(438, SPLASH_POTION);
mapIDs.put(439, SPECTRAL_ARROW);
mapIDs.put(440, TIPPED_ARROW);
mapIDs.put(441, LINGERING_POTION);
mapIDs.put(442, SHIELD);
mapIDs.put(443, ELYTRA);
mapIDs.put(444, BOAT_SPRUCE);
mapIDs.put(445, BOAT_BIRCH);
mapIDs.put(446, BOAT_JUNGLE);
mapIDs.put(447, BOAT_ACACIA);
mapIDs.put(448, BOAT_DARK_OAK);
mapIDs.put(449, TOTEM);
mapIDs.put(450, SHULKER_SHELL);
mapIDs.put(452, IRON_NUGGET);
mapIDs.put(453, KNOWLEDGE_BOOK);
mapIDs.put(2256, GOLD_RECORD);
mapIDs.put(2257, GREEN_RECORD);
mapIDs.put(2258, RECORD_3);
mapIDs.put(2259, RECORD_4);
mapIDs.put(2260, RECORD_5);
mapIDs.put(2261, RECORD_6);
mapIDs.put(2262, RECORD_7);
mapIDs.put(2263, RECORD_8);
mapIDs.put(2264, RECORD_9);
mapIDs.put(2265, RECORD_10);
mapIDs.put(2266, RECORD_11);
mapIDs.put(2267, RECORD_12);
// Create the map for canonical IDs for MineCraft, apart from Bukkit names. This is to aid in
// identifying and using materials that are not named similarly to Bukkit's enumeration.
mapNames = new HashMap<>();
mapNames.put("air", AIR);
mapNames.put("stone", STONE);
mapNames.put("grass", GRASS);
mapNames.put("cobblestone", COBBLESTONE);
mapNames.put("planks", WOOD);
mapNames.put("sapling", SAPLING);
mapNames.put("bedrock", BEDROCK);
mapNames.put("flowing_water", WATER);
mapNames.put("water", STATIONARY_WATER);
mapNames.put("flowing_lava", LAVA);
mapNames.put("lava", STATIONARY_LAVA);
mapNames.put("sand", SAND);
mapNames.put("gravel", GRAVEL);
mapNames.put("gold_ore", GOLD_ORE);
mapNames.put("iron_ore", IRON_ORE);
mapNames.put("coal_ore", COAL_ORE);
mapNames.put("log", LOG);
mapNames.put("leaves", LEAVES);
mapNames.put("sponge", SPONGE);
mapNames.put("glass", GLASS);
mapNames.put("lapis_ore", LAPIS_ORE);
mapNames.put("lapis_block", LAPIS_BLOCK);
mapNames.put("dispenser", DISPENSER);
mapNames.put("sandstone", SANDSTONE);
mapNames.put("noteblock", NOTE_BLOCK);
mapNames.put("bed_block", BED);
mapNames.put("golden_rail", POWERED_RAIL);
mapNames.put("detector_rail", DETECTOR_RAIL);
mapNames.put("sticky_piston", PISTON_STICKY_BASE);
mapNames.put("web", WEB);
mapNames.put("tallgrass", LONG_GRASS);
mapNames.put("deadbush", DEAD_BUSH);
mapNames.put("piston", PISTON_BASE);
mapNames.put("piston_head", PISTON_EXTENSION);
mapNames.put("wool", WOOL);
mapNames.put("yellow_flower", YELLOW_FLOWER);
mapNames.put("red_flower", CHORUS_FLOWER);
mapNames.put("brown_mushroom", BROWN_MUSHROOM);
mapNames.put("red_mushroom", RED_MUSHROOM);
mapNames.put("gold_block", GOLD_BLOCK);
mapNames.put("iron_block", IRON_BLOCK);
mapNames.put("double_stone_slab", DOUBLE_STEP);
mapNames.put("stone_slab", STEP);
mapNames.put("brick_block", BRICK);
mapNames.put("tnt", TNT);
mapNames.put("bookshelf", BOOKSHELF);
mapNames.put("mossy_cobblestone", MOSSY_COBBLESTONE);
mapNames.put("obsidian", OBSIDIAN);
mapNames.put("torch", TORCH);
mapNames.put("fire", FIRE);
mapNames.put("mob_spawner", MOB_SPAWNER);
mapNames.put("oak_stairs", WOOD_STAIRS);
mapNames.put("chest", CHEST);
mapNames.put("redstone_wire", REDSTONE_WIRE);
mapNames.put("diamond_ore", DIAMOND_ORE);
mapNames.put("diamond_block", DIAMOND_BLOCK);
mapNames.put("crafting_table", WORKBENCH);
mapNames.put("wheat", WHEAT);
mapNames.put("farmland", SOIL);
mapNames.put("furnace", FURNACE);
mapNames.put("lit_furnace", BURNING_FURNACE);
mapNames.put("standing_sign", SIGN_POST);
mapNames.put("wooden_door_block", WOODEN_DOOR);
mapNames.put("ladder", LADDER);
mapNames.put("rail", RAILS);
mapNames.put("stone_stairs", COBBLESTONE_STAIRS);
mapNames.put("wall_sign", WALL_SIGN);
mapNames.put("lever", LEVER);
mapNames.put("stone_pressure_plate", STONE_PLATE);
mapNames.put("iron_door_block", IRON_DOOR_BLOCK);
mapNames.put("wooden_pressure_plate", WOOD_PLATE);
mapNames.put("redstone_ore", REDSTONE_ORE);
mapNames.put("lit_redstone_ore", GLOWING_REDSTONE_ORE);
mapNames.put("unlit_redstone_torch", REDSTONE_TORCH_OFF);
mapNames.put("redstone_torch", REDSTONE_TORCH_ON);
mapNames.put("stone_button", STONE_BUTTON);
mapNames.put("snow_layer", SNOW);
mapNames.put("snow", SNOW_BLOCK);
mapNames.put("cactus", CACTUS);
mapNames.put("clay", CLAY);
mapNames.put("reeds_block", SUGAR_CANE_BLOCK);
mapNames.put("jukebox", JUKEBOX);
mapNames.put("fence", FENCE);
mapNames.put("pumpkin", PUMPKIN);
mapNames.put("netherrack", NETHERRACK);
mapNames.put("soul_sand", SOUL_SAND);
mapNames.put("glowstone", GLOWSTONE);
mapNames.put("portal", PORTAL);
mapNames.put("lit_pumpkin", JACK_O_LANTERN);
mapNames.put("cake_block", CAKE_BLOCK);
mapNames.put("unpowered_repeater", DIODE_BLOCK_OFF);
mapNames.put("powered_repeater", DIODE_BLOCK_ON);
mapNames.put("stained_glass", STAINED_GLASS);
mapNames.put("trapdoor", TRAP_DOOR);
mapNames.put("monster_egg", MONSTER_EGG);
mapNames.put("stonebrick", SMOOTH_BRICK);
mapNames.put("brown_mushroom_block", HUGE_MUSHROOM_1);
mapNames.put("red_mushroom_block", HUGE_MUSHROOM_2);
mapNames.put("iron_bars", IRON_FENCE);
mapNames.put("glass_pane", THIN_GLASS);
mapNames.put("melon_block", MELON_BLOCK);
mapNames.put("pumpkin_stem", PUMPKIN_STEM);
mapNames.put("melon_stem", MELON_STEM);
mapNames.put("vine", VINE);
mapNames.put("fence_gate", FENCE_GATE);
mapNames.put("brick_stairs", BRICK_STAIRS);
mapNames.put("stone_brick_stairs", SMOOTH_STAIRS);
mapNames.put("mycellium", MYCEL);
mapNames.put("waterlily", WATER_LILY);
mapNames.put("nether_brick", NETHER_BRICK);
mapNames.put("nether_brick_fence", NETHER_FENCE);
mapNames.put("nether_brick_stairs", NETHER_BRICK_STAIRS);
mapNames.put("nether_warts_block", NETHER_WARTS);
mapNames.put("enchanting_table", ENCHANTMENT_TABLE);
mapNames.put("brewing_stand_block", BREWING_STAND);
mapNames.put("cauldron_block", CAULDRON);
mapNames.put("end_portal", ENDER_PORTAL);
mapNames.put("end_portal_frame", ENDER_PORTAL_FRAME);
mapNames.put("end_stone", ENDER_STONE);
mapNames.put("dragon_egg", DRAGON_EGG);
mapNames.put("redstone_lamp", REDSTONE_LAMP_OFF);
mapNames.put("lit_redstone_lamp", REDSTONE_LAMP_ON);
mapNames.put("double_wooden_slab", WOOD_DOUBLE_STEP);
mapNames.put("wooden_slab", WOOD_STEP);
mapNames.put("cocoa", COCOA);
mapNames.put("sandstone_stairs", SANDSTONE_STAIRS);
mapNames.put("emerald_ore", EMERALD_ORE);
mapNames.put("ender_chest", ENDER_CHEST);
mapNames.put("tripwire_hook", TRIPWIRE_HOOK);
mapNames.put("tripwire", TRIPWIRE); // Note: Tripwire is also named 'tripwire_hook'.
mapNames.put("emerald_block", EMERALD_BLOCK);
mapNames.put("spruce_stairs", SPRUCE_WOOD_STAIRS);
mapNames.put("birch_stairs", BIRCH_WOOD_STAIRS);
mapNames.put("jungle_stairs", JUNGLE_WOOD_STAIRS);
mapNames.put("command_block", COMMAND);
mapNames.put("beacon", BEACON);
mapNames.put("cobblestone_wall", COBBLE_WALL);
mapNames.put("flower_pot_block", FLOWER_POT);
mapNames.put("carrots", CARROT);
mapNames.put("potatoes", POTATO);
mapNames.put("wooden_button", WOOD_BUTTON);
mapNames.put("skull_block", SKULL);
mapNames.put("anvil", ANVIL);
mapNames.put("trapped_chest", TRAPPED_CHEST);
mapNames.put("light_weighted_pressure_plate", GOLD_PLATE);
mapNames.put("heavy_weighted_pressure_plate", IRON_PLATE);
mapNames.put("unpowered_comparator", REDSTONE_COMPARATOR_OFF);
mapNames.put("powered_comparator", REDSTONE_COMPARATOR);
mapNames.put("daylight_detector", DAYLIGHT_DETECTOR);
mapNames.put("redstone_block", REDSTONE_BLOCK);
mapNames.put("quartz_ore", QUARTZ_ORE);
mapNames.put("hopper", HOPPER);
mapNames.put("quartz_block", QUARTZ_BLOCK);
mapNames.put("quartz_stairs", QUARTZ_STAIRS);
mapNames.put("activator_rail", ACTIVATOR_RAIL);
mapNames.put("dropper", DROPPER);
mapNames.put("stained_hardened_clay", STAINED_CLAY);
mapNames.put("stained_glass_pane", STAINED_GLASS_PANE);
mapNames.put("leaves2", LEAVES_2);
mapNames.put("log2", LOG_2);
mapNames.put("acacia_stairs", ACACIA_STAIRS);
mapNames.put("dark_oak_stairs", DARK_OAK_STAIRS);
mapNames.put("slime", SLIME_BLOCK);
mapNames.put("barrier", BARRIER);
mapNames.put("iron_trapdoor", IRON_TRAPDOOR);
mapNames.put("prismarine", PRISMARINE);
mapNames.put("sea_lantern", SEA_LANTERN);
mapNames.put("hay_block", HAY_BLOCK);
mapNames.put("carpet", CARPET);
mapNames.put("hardened_clay", HARD_CLAY);
mapNames.put("coal_block", COAL_BLOCK);
mapNames.put("packed_ice", PACKED_ICE);
mapNames.put("double_plant", DOUBLE_PLANT);
mapNames.put("standing_banner", STANDING_BANNER);
mapNames.put("wall_banner", WALL_BANNER);
mapNames.put("daylight_detector_inverted", DAYLIGHT_DETECTOR_INVERTED);
mapNames.put("red_sandstone", RED_SANDSTONE);
mapNames.put("red_sandstone_stairs", RED_SANDSTONE_STAIRS);
mapNames.put("double_stone_slab2", DOUBLE_STONE_SLAB2);
mapNames.put("stone_slab2", STONE_SLAB2);
mapNames.put("spruce_fence_gate", SPRUCE_FENCE_GATE);
mapNames.put("birch_fence_gate", BIRCH_FENCE_GATE);
mapNames.put("jungle_fence_gate", JUNGLE_FENCE_GATE);
mapNames.put("dark_oak_fence_gate", DARK_OAK_FENCE_GATE);
mapNames.put("acacia_fence_gate", ACACIA_FENCE_GATE);
mapNames.put("spruce_fence", SPRUCE_FENCE);
mapNames.put("birch_fence", BIRCH_FENCE);
mapNames.put("jungle_fence", JUNGLE_FENCE);
mapNames.put("dark_oak_fence", DARK_OAK_FENCE);
mapNames.put("acacia_fence", ACACIA_FENCE);
mapNames.put("spruce_door_block", SPRUCE_DOOR);
mapNames.put("birch_door_block", BIRCH_DOOR);
mapNames.put("jungle_door_block", JUNGLE_DOOR);
mapNames.put("acacia_door_block", ACACIA_DOOR);
mapNames.put("dark_oak_door_block", DARK_OAK_DOOR);
mapNames.put("end_rod", END_ROD);
mapNames.put("chorus_plant", CHORUS_PLANT);
mapNames.put("chorus_flower", CHORUS_FLOWER);
mapNames.put("purpur_block", PURPUR_BLOCK);
mapNames.put("purpur_pillar", PURPUR_PILLAR);
mapNames.put("purpur_stairs", PURPUR_STAIRS);
mapNames.put("purpur_double_slab", PURPUR_DOUBLE_SLAB);
mapNames.put("purpur_slab", PURPUR_SLAB);
mapNames.put("end_bricks", END_BRICKS);
mapNames.put("beetroots", BEETROOT_BLOCK);
mapNames.put("grass_path", GRASS_PATH);
mapNames.put("end_gateway", END_GATEWAY);
mapNames.put("repeating_command_block", COMMAND_REPEATING);
mapNames.put("chain_command_block", COMMAND_CHAIN);
mapNames.put("frosted_ice", FROSTED_ICE);
mapNames.put("magma", MAGMA);
mapNames.put("nether_wart_block", NETHER_WART_BLOCK);
mapNames.put("red_nether_brick", RED_NETHER_BRICK);
mapNames.put("bone_block", BONE_BLOCK);
mapNames.put("structure_void", STRUCTURE_VOID);
mapNames.put("observer", OBSERVER);
mapNames.put("white_shulker_box", WHITE_SHULKER_BOX);
mapNames.put("orange_shulker_box", ORANGE_SHULKER_BOX);
mapNames.put("magenta_shulker_box", MAGENTA_SHULKER_BOX);
mapNames.put("light_blue_shulker_box", LIGHT_BLUE_SHULKER_BOX);
mapNames.put("yellow_shulker_box", YELLOW_SHULKER_BOX);
mapNames.put("lime_shulker_box", LIME_SHULKER_BOX);
mapNames.put("pink_shulker_box", PINK_SHULKER_BOX);
mapNames.put("gray_shulker_box", GRAY_SHULKER_BOX);
mapNames.put("silver_shulker_box", SILVER_SHULKER_BOX);
mapNames.put("cyan_shulker_box", CYAN_SHULKER_BOX);
mapNames.put("purple_shulker_box", CYAN_SHULKER_BOX);
mapNames.put("blue_shulker_box", BLUE_SHULKER_BOX);
mapNames.put("brown_shulker_box", BROWN_SHULKER_BOX);
mapNames.put("green_shulker_box", GREEN_SHULKER_BOX);
mapNames.put("red_shulker_box", RED_SHULKER_BOX);
mapNames.put("black_shulker_box", BLACK_SHULKER_BOX);
mapNames.put("white_glazed_terracotta", WHITE_GLAZED_TERRACOTTA);
mapNames.put("orange_glazed_terracotta", ORANGE_GLAZED_TERRACOTTA);
mapNames.put("magenta_glazed_terracotta", MAGENTA_GLAZED_TERRACOTTA);
mapNames.put("light_blue_glazed_terracotta", LIGHT_BLUE_GLAZED_TERRACOTTA);
mapNames.put("yellow_glazed_terracotta", YELLOW_GLAZED_TERRACOTTA);
mapNames.put("lime_glazed_terracotta", LIME_GLAZED_TERRACOTTA);
mapNames.put("pink_glazed_terracotta", PINK_GLAZED_TERRACOTTA);
mapNames.put("gray_glazed_terracotta", GRAY_GLAZED_TERRACOTTA);
mapNames.put("light_gray_glazed_terracotta", SILVER_GLAZED_TERRACOTTA);
mapNames.put("cyan_glazed_terracotta", CYAN_GLAZED_TERRACOTTA);
mapNames.put("purple_glazed_terracotta", PURPLE_GLAZED_TERRACOTTA);
mapNames.put("blue_glazed_terracotta", BLUE_GLAZED_TERRACOTTA);
mapNames.put("brown_glazed_terracotta", BROWN_GLAZED_TERRACOTTA);
mapNames.put("green_glazed_terracotta", GREEN_GLAZED_TERRACOTTA);
mapNames.put("red_glazed_terracotta", RED_GLAZED_TERRACOTTA);
mapNames.put("black_glazed_terracotta", BLACK_GLAZED_TERRACOTTA);
mapNames.put("concrete", CONCRETE);
mapNames.put("concrete_powder", CONCRETE_POWDER);
mapNames.put("structure_block", STRUCTURE_BLOCK);
mapNames.put("iron_shovel", IRON_SPADE);
mapNames.put("iron_pickaxe", IRON_PICKAXE);
mapNames.put("iron_axe", IRON_AXE);
mapNames.put("flint_and_steel", FLINT_AND_STEEL);
mapNames.put("apple", APPLE);
mapNames.put("bow", BOW);
mapNames.put("arrow", ARROW);
mapNames.put("coal", COAL);
mapNames.put("diamond", DIAMOND);
mapNames.put("iron_ingot", IRON_INGOT);
mapNames.put("gold_ingot", GOLD_INGOT);
mapNames.put("iron_sword", IRON_SWORD);
mapNames.put("wooden_sword", WOOD_SWORD);
mapNames.put("wooden_shovel", WOOD_SPADE);
mapNames.put("wooden_pickaxe", WOOD_PICKAXE);
mapNames.put("wooden_axe", WOOD_AXE);
mapNames.put("stone_sword", STONE_SWORD);
mapNames.put("stone_shovel", STONE_SPADE);
mapNames.put("stone_pickaxe", STONE_PICKAXE);
mapNames.put("stone_axe", STONE_AXE);
mapNames.put("diamond_sword", DIAMOND_SWORD);
mapNames.put("diamond_shovel", DIAMOND_SPADE);
mapNames.put("diamond_pickaxe", DIAMOND_PICKAXE);
mapNames.put("diamond_axe", DIAMOND_AXE);
mapNames.put("stick", STICK);
mapNames.put("bowl", BOWL);
mapNames.put("mushroom_stew", MUSHROOM_SOUP);
mapNames.put("golden_sword", GOLD_SWORD);
mapNames.put("golden_shovel", GOLD_SPADE);
mapNames.put("golden_pickaxe", GOLD_PICKAXE);
mapNames.put("golden_axe", GOLD_AXE);
mapNames.put("string", STRING);
mapNames.put("feather", FEATHER);
mapNames.put("gunpowder", SULPHUR);
mapNames.put("wooden_hoe", WOOD_HOE);
mapNames.put("stone_hoe", STONE_HOE);
mapNames.put("iron_hoe", IRON_HOE);
mapNames.put("diamond_hoe", DIAMOND_HOE);
mapNames.put("golden_hoe", GOLD_HOE);
mapNames.put("wheat_seeds", WHEAT);
mapNames.put("bread", BREAD);
mapNames.put("leather_helmet", LEATHER_HELMET);
mapNames.put("leather_chestplate", LEATHER_CHESTPLATE);
mapNames.put("leather_leggings", LEATHER_LEGGINGS);
mapNames.put("leather_boots", LEATHER_BOOTS);
mapNames.put("chainmail_helmet", CHAINMAIL_HELMET);
mapNames.put("chainmail_chestplate", CHAINMAIL_CHESTPLATE);
mapNames.put("chainmail_leggings", CHAINMAIL_LEGGINGS);
mapNames.put("chainmail_boots", CHAINMAIL_BOOTS);
mapNames.put("iron_helmet", IRON_HELMET);
mapNames.put("iron_chestplate", IRON_CHESTPLATE);
mapNames.put("iron_leggings", IRON_LEGGINGS);
mapNames.put("iron_boots", IRON_BOOTS);
mapNames.put("diamond_helmet", DIAMOND_HELMET);
mapNames.put("diamond_chestplate", DIAMOND_CHESTPLATE);
mapNames.put("diamond_leggings", DIAMOND_LEGGINGS);
mapNames.put("diamond_boots", DIAMOND_BOOTS);
mapNames.put("golden_helmet", GOLD_HELMET);
mapNames.put("golden_chestplate", GOLD_CHESTPLATE);
mapNames.put("golden_leggings", GOLD_LEGGINGS);
mapNames.put("golden_boots", GOLD_BOOTS);
mapNames.put("flint", FLINT);
mapNames.put("porkchop", PORK);
mapNames.put("cooked_porkchop", GRILLED_PORK);
mapNames.put("painting", PAINTING);
mapNames.put("golden_apple", GOLDEN_APPLE);
mapNames.put("sign", SIGN);
mapNames.put("wooden_door", WOODEN_DOOR);
mapNames.put("wood_door", WOODEN_DOOR);
mapNames.put("bucket", BUCKET);
mapNames.put("water_bucket", WATER_BUCKET);
mapNames.put("lava_bucket", LAVA_BUCKET);
mapNames.put("minecart", MINECART);
mapNames.put("saddle", SADDLE);
mapNames.put("iron_door", IRON_DOOR);
mapNames.put("redstone", REDSTONE);
mapNames.put("snowball", SNOW_BALL);
mapNames.put("boat", BOAT);
mapNames.put("leather", LEATHER);
mapNames.put("milk_bucket", MILK_BUCKET);
mapNames.put("brick", CLAY_BRICK);
mapNames.put("clay_ball", CLAY_BALL);
mapNames.put("reeds", SUGAR_CANE);
mapNames.put("paper", PAPER);
mapNames.put("book", BOOK);
mapNames.put("slime_ball", SLIME_BALL);
mapNames.put("chest_minecart", STORAGE_MINECART);
mapNames.put("furnace_minecart", POWERED_MINECART);
mapNames.put("egg", EGG);
mapNames.put("compass", COMPASS);
mapNames.put("fishing_rod", FISHING_ROD);
mapNames.put("clock", WATCH);
mapNames.put("glowstone_dust", GLOWSTONE_DUST);
mapNames.put("fish", RAW_FISH);
mapNames.put("cooked_fish", COOKED_FISH);
mapNames.put("dye", INK_SACK);
mapNames.put("bone", BONE);
mapNames.put("sugar", SUGAR);
mapNames.put("cake", CAKE);
mapNames.put("bed", BED);
mapNames.put("repeater", DIODE);
mapNames.put("cookie", COOKIE);
mapNames.put("filled_map", MAP);
mapNames.put("shears", SHEARS);
mapNames.put("melon", MELON);
mapNames.put("pumpkin_seeds", PUMPKIN_SEEDS);
mapNames.put("melon_seeds", MELON_SEEDS);
mapNames.put("beef", RAW_BEEF);
mapNames.put("cooked_beef", COOKED_BEEF);
mapNames.put("chicken", RAW_CHICKEN);
mapNames.put("cooked_chicken", COOKED_CHICKEN);
mapNames.put("rotten_flesh", ROTTEN_FLESH);
mapNames.put("ender_pearl", ENDER_PEARL);
mapNames.put("blaze_rod", BLAZE_ROD);
mapNames.put("ghast_tear", GHAST_TEAR);
mapNames.put("gold_nugget", GOLD_NUGGET);
mapNames.put("nether_wart", NETHER_WARTS);
mapNames.put("potion", POTION);
mapNames.put("glass_bottle", GLASS_BOTTLE);
mapNames.put("spider_eye", SPIDER_EYE);
mapNames.put("fermented_spider_eye", FERMENTED_SPIDER_EYE);
mapNames.put("blaze_powder", BLAZE_POWDER);
mapNames.put("magma_cream", MAGMA_CREAM);
mapNames.put("brewing_stand", BREWING_STAND_ITEM);
mapNames.put("cauldron", CAULDRON_ITEM);
mapNames.put("ender_eye", EYE_OF_ENDER);
mapNames.put("speckled_melon", SPECKLED_MELON);
mapNames.put("experience_bottle", EXP_BOTTLE);
mapNames.put("fire_charge", FIREWORK_CHARGE);
mapNames.put("writable_book", BOOK_AND_QUILL);
mapNames.put("written_book", WRITTEN_BOOK);
mapNames.put("emerald", EMERALD);
mapNames.put("item_frame", ITEM_FRAME);
mapNames.put("flower_pot", FLOWER_POT_ITEM);
mapNames.put("carrot", CARROT_ITEM);
mapNames.put("potato", POTATO_ITEM);
mapNames.put("baked_potato", BAKED_POTATO);
mapNames.put("poisonous_potato", POISONOUS_POTATO);
mapNames.put("map", MAP);
mapNames.put("golden_carrot", GOLDEN_CARROT);
mapNames.put("skull", SKULL_ITEM);
mapNames.put("carrot_on_a_stick", CARROT_STICK);
mapNames.put("nether_star", NETHER_STAR);
mapNames.put("pumpkin_pie", PUMPKIN_PIE);
mapNames.put("fireworks", FIREWORK);
mapNames.put("firework_charge", FIREWORK_CHARGE);
mapNames.put("enchanted_book", ENCHANTED_BOOK);
mapNames.put("comparator", REDSTONE_COMPARATOR);
mapNames.put("netherbrick", NETHER_BRICK_ITEM);
mapNames.put("quartz", QUARTZ);
mapNames.put("tnt_minecart", EXPLOSIVE_MINECART);
mapNames.put("hopper_minecart", HOPPER_MINECART);
mapNames.put("prismarine_shard", PRISMARINE_SHARD);
mapNames.put("prismarine_crystals", PRISMARINE_CRYSTALS);
mapNames.put("rabbit", RABBIT);
mapNames.put("cooked_rabbit", COOKED_RABBIT);
mapNames.put("rabbit_stew", RABBIT_STEW);
mapNames.put("rabbit_foot", RABBIT_FOOT);
mapNames.put("rabbit_hide", RABBIT_HIDE);
mapNames.put("armor_stand", ARMOR_STAND);
mapNames.put("iron_horse_armor", IRON_BARDING);
mapNames.put("golden_horse_armor", GOLD_BARDING);
mapNames.put("diamond_horse_armor", DIAMOND_BARDING);
mapNames.put("lead", LEASH);
mapNames.put("name_tag", NAME_TAG);
mapNames.put("command_block_minecart", COMMAND_MINECART);
mapNames.put("mutton", MUTTON);
mapNames.put("cooked_mutton", COOKED_MUTTON);
mapNames.put("banner", BANNER);
mapNames.put("end_crystal", END_CRYSTAL);
mapNames.put("spruce_door", SPRUCE_DOOR_ITEM);
mapNames.put("birch_door", BIRCH_DOOR_ITEM);
mapNames.put("jungle_door", JUNGLE_DOOR_ITEM);
mapNames.put("acacia_door", ACACIA_DOOR_ITEM);
mapNames.put("dark_oak_door", DARK_OAK_DOOR_ITEM);
mapNames.put("chorus_fruit", CHORUS_FRUIT);
mapNames.put("popped_chorus_fruit", CHORUS_FRUIT_POPPED);
mapNames.put("beetroot", BEETROOT);
mapNames.put("beetroot_seeds", BEETROOT_SEEDS);
mapNames.put("beetroot_soup", BEETROOT_SOUP);
mapNames.put("dragon_breath", DRAGONS_BREATH);
mapNames.put("splash_potion", SPLASH_POTION);
mapNames.put("spectral_arrow", SPECTRAL_ARROW);
mapNames.put("tipped_arrow", TIPPED_ARROW);
mapNames.put("lingering_potion", LINGERING_POTION);
mapNames.put("shield", SHIELD);
mapNames.put("elytra", ELYTRA);
mapNames.put("spruce_boat", BOAT_SPRUCE);
mapNames.put("birch_boat", BOAT_BIRCH);
mapNames.put("jungle_boat", BOAT_JUNGLE);
mapNames.put("acacia_boat", BOAT_ACACIA);
mapNames.put("dark_oak_boat", BOAT_DARK_OAK);
mapNames.put("totem_of_undying", TOTEM);
mapNames.put("shulker_shell", SHULKER_SHELL);
mapNames.put("iron_nugget", IRON_NUGGET);
mapNames.put("knowledge_book", KNOWLEDGE_BOOK);
mapNames.put("record_13", GOLD_RECORD);
mapNames.put("record_cat", GREEN_RECORD);
mapNames.put("record_blocks", RECORD_3);
mapNames.put("record_chirp", RECORD_4);
mapNames.put("record_far", RECORD_5);
mapNames.put("record_mall", RECORD_6);
mapNames.put("record_mellohi", RECORD_7);
mapNames.put("record_stal", RECORD_8);
mapNames.put("record_strad", RECORD_9);
mapNames.put("record_ward", RECORD_10);
mapNames.put("record_11", RECORD_11);
mapNames.put("record_wait", RECORD_12);
// Add the bukkit names.
for (Material material : Material.values()) {
mapNames.put(material.name().toLowerCase(), material);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment