Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.HashMap;
- public class ItemBreakPrevent
- {
- public static final HashMap<String, Integer> blockId = new HashMap();
- static
- {
- blockId.put("stone", Integer.valueOf(1));
- blockId.put("grass", Integer.valueOf(2));
- blockId.put("dirt", Integer.valueOf(3));
- blockId.put("cobblestone", Integer.valueOf(4));
- blockId.put("cobble", Integer.valueOf(4));
- blockId.put("woodenplank", Integer.valueOf(5));
- blockId.put("sapling", Integer.valueOf(6));
- blockId.put("bedrock", Integer.valueOf(7));
- blockId.put("water", Integer.valueOf(8));
- blockId.put("lava", Integer.valueOf(10));
- blockId.put("sand", Integer.valueOf(12));
- blockId.put("gravel", Integer.valueOf(13));
- blockId.put("goldore", Integer.valueOf(14));
- blockId.put("ironore", Integer.valueOf(15));
- blockId.put("coalore", Integer.valueOf(16));
- blockId.put("coal", Integer.valueOf(16));
- blockId.put("wood", Integer.valueOf(17));
- blockId.put("leaves", Integer.valueOf(18));
- blockId.put("sponge", Integer.valueOf(19));
- blockId.put("glass", Integer.valueOf(20));
- blockId.put("lapislazuliore", Integer.valueOf(21));
- blockId.put("lapislazuli", Integer.valueOf(21));
- blockId.put("dispenser", Integer.valueOf(23));
- blockId.put("sandstone", Integer.valueOf(24));
- blockId.put("noteblock", Integer.valueOf(25));
- blockId.put("bed", Integer.valueOf(26));
- blockId.put("poweredrail", Integer.valueOf(27));
- blockId.put("detectorrail", Integer.valueOf(28));
- blockId.put("stickypiston", Integer.valueOf(29));
- blockId.put("web", Integer.valueOf(30));
- blockId.put("deadshrub", Integer.valueOf(32));
- blockId.put("piston", Integer.valueOf(33));
- blockId.put("wool", Integer.valueOf(35));
- blockId.put("dandelion", Integer.valueOf(37));
- blockId.put("rose", Integer.valueOf(38));
- blockId.put("brownmushroom", Integer.valueOf(39));
- blockId.put("redmushroom", Integer.valueOf(40));
- blockId.put("goldblock", Integer.valueOf(41));
- blockId.put("ironblock", Integer.valueOf(42));
- blockId.put("stoneslab", Integer.valueOf(44));
- blockId.put("brick", Integer.valueOf(45));
- blockId.put("tnt", Integer.valueOf(46));
- blockId.put("bookcase", Integer.valueOf(47));
- blockId.put("mossstone", Integer.valueOf(48));
- blockId.put("obsidian", Integer.valueOf(49));
- blockId.put("torch", Integer.valueOf(50));
- blockId.put("fire", Integer.valueOf(51));
- blockId.put("mobspawner", Integer.valueOf(52));
- blockId.put("oakwoodstairs", Integer.valueOf(53));
- blockId.put("chest", Integer.valueOf(54));
- blockId.put("redstonewire", Integer.valueOf(55));
- blockId.put("diamondore", Integer.valueOf(56));
- blockId.put("diamondblock", Integer.valueOf(57));
- blockId.put("craftingtable", Integer.valueOf(58));
- blockId.put("wheat", Integer.valueOf(59));
- blockId.put("farmland", Integer.valueOf(60));
- blockId.put("furnace", Integer.valueOf(61));
- blockId.put("sign", Integer.valueOf(63));
- blockId.put("ladder", Integer.valueOf(65));
- blockId.put("rail", Integer.valueOf(66));
- blockId.put("cobblestonestairs", Integer.valueOf(67));
- blockId.put("lever", Integer.valueOf(69));
- blockId.put("stonepressureplate", Integer.valueOf(70));
- blockId.put("woodenpressureplate", Integer.valueOf(72));
- blockId.put("redstoneore", Integer.valueOf(73));
- blockId.put("redstonetorch", Integer.valueOf(76));
- blockId.put("stonebutton", Integer.valueOf(77));
- blockId.put("snow", Integer.valueOf(78));
- blockId.put("ice", Integer.valueOf(79));
- blockId.put("snowblock", Integer.valueOf(80));
- blockId.put("cactus", Integer.valueOf(81));
- blockId.put("clayblock", Integer.valueOf(82));
- blockId.put("sugarcane", Integer.valueOf(83));
- blockId.put("jukebox", Integer.valueOf(84));
- blockId.put("fence", Integer.valueOf(85));
- blockId.put("pumpkin", Integer.valueOf(86));
- blockId.put("netherrack", Integer.valueOf(87));
- blockId.put("soulsand", Integer.valueOf(88));
- blockId.put("glowstone", Integer.valueOf(89));
- blockId.put("portal", Integer.valueOf(90));
- blockId.put("jackolantern", Integer.valueOf(91));
- blockId.put("cake", Integer.valueOf(92));
- blockId.put("redstonerepeater", Integer.valueOf(94));
- blockId.put("trapdoor", Integer.valueOf(96));
- blockId.put("stonebrick", Integer.valueOf(98));
- blockId.put("brownmushroomblock", Integer.valueOf(99));
- blockId.put("redmushroomblock", Integer.valueOf(100));
- blockId.put("ironbars", Integer.valueOf(101));
- blockId.put("glasspane", Integer.valueOf(102));
- blockId.put("melon", Integer.valueOf(103));
- blockId.put("pumpkinvine", Integer.valueOf(104));
- blockId.put("melonvine", Integer.valueOf(105));
- blockId.put("vines", Integer.valueOf(106));
- blockId.put("fencegate", Integer.valueOf(107));
- blockId.put("brickstairs", Integer.valueOf(108));
- blockId.put("stonebrickstairs", Integer.valueOf(109));
- blockId.put("mycellium", Integer.valueOf(110));
- blockId.put("lilypad", Integer.valueOf(111));
- blockId.put("netherbrick", Integer.valueOf(112));
- blockId.put("netherbrickfence", Integer.valueOf(113));
- blockId.put("netherbrickstairs", Integer.valueOf(114));
- blockId.put("netherwart", Integer.valueOf(115));
- blockId.put("enchantmenttable", Integer.valueOf(116));
- blockId.put("brewingstand", Integer.valueOf(117));
- blockId.put("cauldron", Integer.valueOf(118));
- blockId.put("endportal", Integer.valueOf(119));
- blockId.put("endportalframe", Integer.valueOf(120));
- blockId.put("endstone", Integer.valueOf(121));
- blockId.put("dragonegg", Integer.valueOf(122));
- blockId.put("redstonelamp", Integer.valueOf(123));
- blockId.put("woodenslab", Integer.valueOf(126));
- blockId.put("cocoaplant", Integer.valueOf(127));
- blockId.put("sandstonestairs", Integer.valueOf(128));
- blockId.put("emeraldore", Integer.valueOf(129));
- blockId.put("enderchest", Integer.valueOf(130));
- blockId.put("tripwirehook", Integer.valueOf(131));
- blockId.put("tripwire", Integer.valueOf(132));
- blockId.put("emeraldblock", Integer.valueOf(133));
- blockId.put("sprucewoodstairs", Integer.valueOf(134));
- blockId.put("birchwoodstairs", Integer.valueOf(135));
- blockId.put("junglewoodstairs", Integer.valueOf(136));
- blockId.put("commandblock", Integer.valueOf(137));
- blockId.put("beacon", Integer.valueOf(138));
- blockId.put("cobblestonewall", Integer.valueOf(139));
- blockId.put("flowerpot", Integer.valueOf(140));
- blockId.put("carrotcrop", Integer.valueOf(141));
- blockId.put("potatocrop", Integer.valueOf(142));
- blockId.put("woodenbutton", Integer.valueOf(143));
- blockId.put("skeletonheadblock", Integer.valueOf(144));
- blockId.put("anvil", Integer.valueOf(145));
- blockId.put("trappedchest", Integer.valueOf(146));
- blockId.put("weightedpressureplatelight", Integer.valueOf(147));
- blockId.put("weightedpressureplateheavy", Integer.valueOf(148));
- blockId.put("comparator", Integer.valueOf(149));
- blockId.put("daylightsensor", Integer.valueOf(151));
- blockId.put("redstoneblock", Integer.valueOf(152));
- blockId.put("quartzore", Integer.valueOf(153));
- blockId.put("hopper", Integer.valueOf(154));
- blockId.put("quartzblock", Integer.valueOf(155));
- blockId.put("quartzstairs", Integer.valueOf(156));
- blockId.put("activatorrail", Integer.valueOf(157));
- blockId.put("dropper", Integer.valueOf(158));
- }
- public static Integer getBlockId(String alias)
- {
- Integer id = (Integer)blockId.get(alias.toLowerCase());
- return id;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment