Advertisement
palmerjj01

preInit

Oct 11th, 2014
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.84 KB | None | 0 0
  1. @EventHandler
  2. public void preInit(FMLPreInitializationEvent event) {
  3. //Item/Block init and registering
  4. //Config handling
  5. YCEntity.mainRegistry();
  6.  
  7. //Items
  8. itemTable = new ItemTable().setUnlocalizedName("ItemTable").setTextureName("yc:itemtable");
  9. itemStick = new ItemStick().setUnlocalizedName("ItemStick").setTextureName("yc:itemstick").setCreativeTab(tabYoshiCraft);
  10. itemCaveShard = new ItemCaveShard().setUnlocalizedName("ItemCaveShard").setTextureName("yc:itemcaveshhard").setCreativeTab(tabYoshiCraft);
  11. itemCocoPowder = new ItemCocoPowder().setUnlocalizedName("ItemCocoPowder").setTextureName("yc:itemcocopowder").setCreativeTab(tabYoshiCraft);
  12. itemYoshiDroppings = new ItemYoshiDroppings().setUnlocalizedName("ItemYoshiDroppings").setTextureName("yc:itemyoshimess").setCreativeTab(tabYoshiCraft);
  13.  
  14. //Grenades
  15. itemYoshiGrenade = new ItemYoshiGrenade().setUnlocalizedName("ItemYoshiGrenade").setTextureName("yc:itemyoshigrenade").setCreativeTab(tabYoshiCraft);
  16.  
  17. //Ingots
  18. itemIngot = new ItemIngot().setUnlocalizedName("ItemIngot").setTextureName("yc:itemingot").setCreativeTab(tabYoshiCraft);
  19. itemSpiritIngot = new ItemSpiritIngot().setUnlocalizedName("ItemSpiritIngot").setTextureName("yc:itemspiritingot").setCreativeTab(tabYoshiCraft);
  20. itemYoshiIngot = new ItemYoshiIngot().setUnlocalizedName("ItemYoshiIngot").setTextureName("yc:itemyoshiingot").setCreativeTab(tabYoshiCraft);
  21.  
  22. //Ingot Alternatives
  23. itemTonguePebble = new ItemTonguePebble().setUnlocalizedName("ItemTonguePebble").setTextureName("yc:tonguepebble").setCreativeTab(tabYoshiCraft);
  24.  
  25. //Food
  26. itemTongue = new FoodTongue(8, 0.6F, false).setUnlocalizedName("ItemTongue").setTextureName("yc:itemtongue").setCreativeTab(tabYoshiCraft);
  27. itemHotTongue = new ItemFood(16, 0.8F, true).setUnlocalizedName("ItemHotTongue").setTextureName("yc:itemhottongue").setCreativeTab(tabYoshiCraft);
  28. itemBerry = new ItemFood(2, 0.3F, false).setUnlocalizedName("ItemBerry").setTextureName("yc:itemberry").setCreativeTab(tabYoshiCraft);
  29. itemDuckBread = new FoodDuckBread(6, 0.6F, false).setUnlocalizedName("ItemDuckBread").setTextureName("yc:sqaisheybread").setCreativeTab(tabYoshiCraft);
  30. itemAdventureChocolate = new FoodAdventureChocolate(6, 0.6F, false).setUnlocalizedName("ItemAdventureChocolate").setTextureName("yc:itemadventurechocolate").setCreativeTab(tabYoshiCraft);
  31. itemAdventurePoo = new FoodAdventurePoo(1, 0.1F, false).setUnlocalizedName("ItemAdventurePoo").setTextureName("yc:itemadventurepoo").setCreativeTab(tabYoshiCraft);
  32. itemChocolateBar = new ItemFood(4, 0.5F, false).setUnlocalizedName("ItemChocolateBar").setTextureName("yc:itemchocolatebar").setCreativeTab(tabYoshiCraft);
  33. itemMuffin = new ItemFood(4, 0.6F, false).setUnlocalizedName("ItemMuffin").setTextureName("yc:itemmuffin").setCreativeTab(tabYoshiCraft);
  34. itemGrannySmithApple = new ItemFood(4, 0.4F, false).setUnlocalizedName("ItemGrannySmithApple").setTextureName("yc:grannysmithapple").setCreativeTab(tabYoshiCraft);
  35. itemApplePie = new FoodApplePie(5, 0.5F, false).setUnlocalizedName("ItemApplePie").setTextureName("yc:applepie").setCreativeTab(tabYoshiCraft);
  36. itemHotApplePie = new FoodWarmApplePie(6, 0.8F, false).setUnlocalizedName("ItemHotApplePie").setTextureName("yc:hotapplepie").setCreativeTab(tabYoshiCraft);
  37. itemBaconRaw = new ItemFood(4, 0.5F, true).setUnlocalizedName("ItemBaconRaw").setTextureName("yc:baconraw").setCreativeTab(tabYoshiCraft);
  38. itemBacon = new ItemFood(8, 0.8F, true).setUnlocalizedName("ItemBacon").setTextureName("yc:bacon").setCreativeTab(tabYoshiCraft);
  39.  
  40. //Blocks
  41. blockTable = new BlockTable(Material.rock).setBlockName("BlockTable").setBlockTextureName("yc:blocktable").setCreativeTab(tabYoshiCraft);
  42. blockLantern = new BlockLantern(Material.rock).setBlockName("BlockLantern").setBlockTextureName("yc:blocklantern").setCreativeTab(tabYoshiCraft);
  43. blockTongue = new BlockTongue(Material.leaves).setBlockName("BlockTongue").setBlockTextureName("yc:blocktongue").setCreativeTab(tabYoshiCraft);
  44. blockSpirit = new BlockSpirit(Material.anvil).setBlockName("BlockSpirit").setBlockTextureName("yc:blockspirit").setCreativeTab(tabYoshiCraft);
  45. blockCaveRock = new BlockCaveRock(Material.rock).setBlockName("BlockCaveRock").setBlockTextureName("yc:blockcaverock").setCreativeTab(tabYoshiCraft);
  46. blockYoshi = new BlockYoshi(Material.rock).setBlockName("BlockYoshi").setCreativeTab(tabYoshiCraft);
  47. blockYoshiTrophy = new BlockYoshiTrophy(Material.iron).setBlockName("BlockYoshiTrophy").setBlockTextureName("yc:").setCreativeTab(tabYoshiCraft);
  48. blockYoshiGlass = new BlockYoshiGlass(Material.glass).setBlockName("BlockYoshiGlass").setBlockTextureName("yc:yoshiglass");
  49. blockSurface = new BlockSurface(Material.rock).setBlockName("BlockSurface").setBlockTextureName("yc:surface").setCreativeTab(tabYoshiCraft);
  50.  
  51. //Portal
  52.  
  53. //Chests
  54.  
  55. //Furnaces
  56. yoshiOvenIdle = new YoshiOven(false).setBlockName("YoshiOvenIdle").setCreativeTab(tabYoshiCraft);
  57. yoshiOvenActive = new YoshiOven(true).setBlockName("YoshiOvenActive");
  58.  
  59. //Ores
  60. blockSpiritOre = new BlockSpiritOre(Material.rock).setBlockName("BlockSpiritOre").setBlockTextureName("yc:blockspiritore").setCreativeTab(tabYoshiCraft);
  61. blockTongueOre = new BlockTongueOre(Material.rock).setBlockName("BlockTongueOre").setBlockTextureName("yc:blocktongueore").setCreativeTab(tabYoshiCraft);
  62. blockYoshiOre = new BlockYoshiOre(Material.rock).setBlockName("BlockYoshiOre").setBlockTextureName("yc:blockyoshiore").setCreativeTab(tabYoshiCraft);
  63. blockEndTongueOre = new BlockEndTongueOre(Material.rock).setBlockName("BlockEndTongueOre").setBlockTextureName("yc:endtongueore").setCreativeTab(tabYoshiCraft);
  64. blockNetherTongueOre = new BlockNetherTongueOre(Material.rock).setBlockName("BlockNetherTongueOre").setBlockTextureName("yc:nethertongueore").setCreativeTab(tabYoshiCraft);
  65.  
  66. //Tools
  67. legendarySword = new ItemLegendarySword(legendaryToolMaterial).setUnlocalizedName("ItemLegendarySword").setTextureName("yc:itemlegendarysword").setCreativeTab(tabYoshiCraft);
  68. legendaryPickaxe = new ItemLegendaryPickaxe(legendaryToolMaterial).setUnlocalizedName("ItemLegendaryPickaxe").setTextureName("yc:itemlegendarypickaxe").setCreativeTab(tabYoshiCraft);
  69. spiritPickaxe = new ItemSpiritPickaxe(spiritToolMaterial).setUnlocalizedName("ItemSpiritPickaxe").setTextureName("yc:itemspiritpickaxe").setCreativeTab(tabYoshiCraft);
  70. spiritAxe = new ItemSpiritAxe(spiritToolMaterial).setUnlocalizedName("ItemSpiritAxe").setTextureName("yc:itemspiritaxe").setCreativeTab(tabYoshiCraft);
  71. spiritShovel = new ItemSpiritShovel(spiritToolMaterial).setUnlocalizedName("ItemSpiritShovel").setTextureName("yc:itemspiritshovel").setCreativeTab(tabYoshiCraft);
  72. spiritHoe = new ItemSpiritHoe(spiritToolMaterial).setUnlocalizedName("ItemSpiritHoe").setTextureName("yc:itemspirithoe").setCreativeTab(tabYoshiCraft);
  73. spiritSword = new ItemSpiritSword(spiritToolMaterial).setUnlocalizedName("ItemSpiritSword").setTextureName("yc:itemspiritsword").setCreativeTab(tabYoshiCraft);
  74. tonguePickaxe = new ItemTonguePickaxe(tongueToolMaterial).setUnlocalizedName("ItemTonguePickaxe").setTextureName("yc:itemtonguepickaxe").setCreativeTab(tabYoshiCraft);
  75. tongueAxe = new ItemTongueAxe(tongueToolMaterial).setUnlocalizedName("ItemTongueAxe").setTextureName("yc:itemtongueaxe").setCreativeTab(tabYoshiCraft);
  76. tongueShovel = new ItemTongueShovel(tongueToolMaterial).setUnlocalizedName("ItemTongueShovel").setTextureName("yc:itemtongueshovel").setCreativeTab(tabYoshiCraft);
  77. tongueHoe = new ItemTongueHoe(tongueToolMaterial).setUnlocalizedName("ItemTongueHoe").setTextureName("yc:itemtonguehoe").setCreativeTab(tabYoshiCraft);
  78. tongueSword = new ItemTongueSword(tongueToolMaterial).setUnlocalizedName("ItemTongueSword").setTextureName("yc:itemtonguesword").setCreativeTab(tabYoshiCraft);
  79.  
  80. //Armour
  81. spiritHelmet = new ItemSpiritArmour(spiritArmourMaterial, 0, 0).setUnlocalizedName("ItemSpiritHelmet").setTextureName("yc:itemspirithelmet").setCreativeTab(tabYoshiCraft);
  82. spiritChestplate = new ItemSpiritArmour(spiritArmourMaterial, 0, 1).setUnlocalizedName("ItemSpiritChestplate").setTextureName("yc:itemspiritchestplate").setCreativeTab(tabYoshiCraft);
  83. spiritLeggings = new ItemSpiritArmour(spiritArmourMaterial, 0, 2).setUnlocalizedName("ItemSpiritLeggings").setTextureName("yc:itemspiritleggings").setCreativeTab(tabYoshiCraft);
  84. spiritBoots = new ItemSpiritArmour(spiritArmourMaterial, 0, 3).setUnlocalizedName("ItemSpiritBoots").setTextureName("yc:itemspiritboots").setCreativeTab(tabYoshiCraft);
  85. //
  86. tongueHelmet = new ItemTongueArmour(tongueArmourMaterial, 0, 0).setUnlocalizedName("ItemTongueHelmet").setTextureName("yc:itemtonguehelmet").setCreativeTab(tabYoshiCraft);
  87. tongueChestplate = new ItemTongueArmour(tongueArmourMaterial, 0, 1).setUnlocalizedName("ItemTongueChestplate").setTextureName("yc:itemtonguechestplate").setCreativeTab(tabYoshiCraft);
  88. tongueLeggings = new ItemTongueArmour(tongueArmourMaterial, 0, 2).setUnlocalizedName("ItemTongueLeggings").setTextureName("yc:itemtongueleggings").setCreativeTab(tabYoshiCraft);
  89. tongueBoots = new ItemTongueArmour(tongueArmourMaterial, 0, 3).setUnlocalizedName("ItemTongueBoots").setTextureName("yc:itemtongueboots").setCreativeTab(tabYoshiCraft);
  90. //
  91. yoshiHelmet = new ItemYoshiArmour(yoshiArmourMaterial, 0, 0).setUnlocalizedName("ItemYoshiHelmet").setTextureName("yc:itemyoshihelmet").setCreativeTab(tabYoshiCraft);
  92. yoshiChestplate = new ItemYoshiArmour(yoshiArmourMaterial, 0, 1).setUnlocalizedName("ItemYoshiChestplate").setTextureName("yc:itemyoshichestplate").setCreativeTab(tabYoshiCraft);
  93. yoshiLeggings = new ItemYoshiArmour(yoshiArmourMaterial, 0, 2).setUnlocalizedName("ItemYoshiLeggings").setTextureName("yc:itemyoshileggings").setCreativeTab(tabYoshiCraft);
  94. yoshiBoots = new ItemYoshiArmour(yoshiArmourMaterial, 0, 3).setUnlocalizedName("ItemYoshiBoots").setTextureName("yc:itemyoshiboots").setCreativeTab(tabYoshiCraft);
  95.  
  96. //Biomes
  97. BiomesYC.init();
  98.  
  99. //Registry
  100.  
  101. //Items
  102. GameRegistry.registerItem(itemTable, itemTable.getUnlocalizedName().substring(5));
  103. GameRegistry.registerItem(itemStick, itemStick.getUnlocalizedName().substring(5));
  104. GameRegistry.registerItem(itemCaveShard, itemCaveShard.getUnlocalizedName().substring(5));
  105. GameRegistry.registerItem(itemCocoPowder, itemCocoPowder.getUnlocalizedName().substring(5));
  106. GameRegistry.registerItem(itemYoshiDroppings, itemYoshiDroppings.getUnlocalizedName().substring(5));
  107.  
  108. //Grenades
  109. GameRegistry.registerItem(itemYoshiGrenade, itemYoshiGrenade.getUnlocalizedName().substring(5));
  110.  
  111. //Ingots
  112. GameRegistry.registerItem(itemIngot, itemIngot.getUnlocalizedName().substring(5));
  113. GameRegistry.registerItem(itemSpiritIngot, itemSpiritIngot.getUnlocalizedName().substring(5));
  114. GameRegistry.registerItem(itemYoshiIngot, itemYoshiIngot.getUnlocalizedName().substring(5));
  115. //Ingot Alternatives
  116. GameRegistry.registerItem(itemTonguePebble, itemTonguePebble.getUnlocalizedName().substring(5));
  117.  
  118. //Food
  119. GameRegistry.registerItem(itemTongue, itemTongue.getUnlocalizedName().substring(5));
  120. GameRegistry.registerItem(itemHotTongue, itemHotTongue.getUnlocalizedName().substring(5));
  121. GameRegistry.registerItem(itemBerry, itemBerry.getUnlocalizedName().substring(5));
  122. GameRegistry.registerItem(itemDuckBread, itemDuckBread.getUnlocalizedName().substring(5));
  123. GameRegistry.registerItem(itemAdventureChocolate, itemAdventureChocolate.getUnlocalizedName().substring(5));
  124. GameRegistry.registerItem(itemAdventurePoo, itemAdventurePoo.getUnlocalizedName().substring(5));
  125. GameRegistry.registerItem(itemChocolateBar, itemChocolateBar.getUnlocalizedName().substring(5));
  126. GameRegistry.registerItem(itemMuffin, itemMuffin.getUnlocalizedName().substring(5));
  127. GameRegistry.registerItem(itemGrannySmithApple, itemGrannySmithApple.getUnlocalizedName().substring(5));
  128. GameRegistry.registerItem(itemApplePie, itemApplePie.getUnlocalizedName().substring(5));
  129. GameRegistry.registerItem(itemHotApplePie, itemHotApplePie.getUnlocalizedName().substring(5));
  130. GameRegistry.registerItem(itemBaconRaw, itemBaconRaw.getUnlocalizedName().substring(5));
  131. GameRegistry.registerItem(itemBacon, itemBacon.getUnlocalizedName().substring(5));
  132.  
  133. //Blocks
  134. GameRegistry.registerBlock(blockTable, blockTable.getUnlocalizedName().substring(5));
  135. GameRegistry.registerBlock(blockLantern, blockLantern.getUnlocalizedName().substring(5));
  136. GameRegistry.registerBlock(blockTongue, blockTongue.getUnlocalizedName().substring(5));
  137. GameRegistry.registerBlock(blockSpirit, blockSpirit.getUnlocalizedName().substring(5));
  138. GameRegistry.registerBlock(blockCaveRock, blockCaveRock.getUnlocalizedName().substring(5));
  139. GameRegistry.registerBlock(blockYoshi, blockYoshi.getUnlocalizedName().substring(5));
  140. GameRegistry.registerBlock(blockYoshiTrophy, blockYoshiTrophy.getUnlocalizedName().substring(5));
  141. GameRegistry.registerBlock(blockYoshiGlass, blockYoshiGlass.getUnlocalizedName().substring(5));
  142. GameRegistry.registerBlock(blockSurface, blockSurface.getUnlocalizedName().substring(5));
  143.  
  144. //Portal
  145. GameRegistry.registerBlock(yoshiPortal, yoshiPortal.getUnlocalizedName().substring(5));
  146.  
  147. //Chests
  148.  
  149. //Furnaces
  150. GameRegistry.registerBlock(yoshiOvenIdle, yoshiOvenIdle.getUnlocalizedName().substring(5));
  151. GameRegistry.registerBlock(yoshiOvenActive, yoshiOvenActive.getUnlocalizedName().substring(5));
  152.  
  153. //Ores
  154. GameRegistry.registerBlock(blockSpiritOre, blockSpiritOre.getUnlocalizedName().substring(5));
  155. GameRegistry.registerBlock(blockTongueOre, blockTongueOre.getUnlocalizedName().substring(5));
  156. GameRegistry.registerBlock(blockYoshiOre, blockYoshiOre.getUnlocalizedName().substring(5));
  157. GameRegistry.registerBlock(blockEndTongueOre, blockEndTongueOre.getUnlocalizedName().substring(5));
  158. GameRegistry.registerBlock(blockNetherTongueOre, blockNetherTongueOre.getUnlocalizedName().substring(5));
  159.  
  160. //Tools
  161. GameRegistry.registerItem(legendarySword, legendarySword.getUnlocalizedName().substring(5));
  162. GameRegistry.registerItem(legendaryPickaxe, legendaryPickaxe.getUnlocalizedName().substring(5));
  163. GameRegistry.registerItem(spiritPickaxe, spiritPickaxe.getUnlocalizedName().substring(5));
  164. GameRegistry.registerItem(spiritAxe, spiritAxe.getUnlocalizedName().substring(5));
  165. GameRegistry.registerItem(spiritShovel, spiritShovel.getUnlocalizedName().substring(5));
  166. GameRegistry.registerItem(spiritHoe, spiritHoe.getUnlocalizedName().substring(5));
  167. GameRegistry.registerItem(spiritSword, spiritSword.getUnlocalizedName().substring(5));
  168. GameRegistry.registerItem(tonguePickaxe, tonguePickaxe.getUnlocalizedName().substring(5));
  169. GameRegistry.registerItem(tongueAxe, tongueAxe.getUnlocalizedName().substring(5));
  170. GameRegistry.registerItem(tongueShovel, tongueShovel.getUnlocalizedName().substring(5));
  171. GameRegistry.registerItem(tongueHoe, tongueHoe.getUnlocalizedName().substring(5));
  172. GameRegistry.registerItem(tongueSword, tongueSword.getUnlocalizedName().substring(5));
  173.  
  174. //Armour
  175. GameRegistry.registerItem(spiritHelmet, spiritHelmet.getUnlocalizedName().substring(5));
  176. GameRegistry.registerItem(spiritChestplate, spiritChestplate.getUnlocalizedName().substring(5));
  177. GameRegistry.registerItem(spiritLeggings, spiritLeggings.getUnlocalizedName().substring(5));
  178. GameRegistry.registerItem(spiritBoots, spiritBoots.getUnlocalizedName().substring(5));
  179. //
  180. GameRegistry.registerItem(tongueHelmet, tongueHelmet.getUnlocalizedName().substring(5));
  181. GameRegistry.registerItem(tongueChestplate, tongueChestplate.getUnlocalizedName().substring(5));
  182. GameRegistry.registerItem(tongueLeggings, tongueLeggings.getUnlocalizedName().substring(5));
  183. GameRegistry.registerItem(tongueBoots, tongueBoots.getUnlocalizedName().substring(5));
  184. //
  185. GameRegistry.registerItem(yoshiHelmet, yoshiHelmet.getUnlocalizedName().substring(5));
  186. GameRegistry.registerItem(yoshiChestplate, yoshiChestplate.getUnlocalizedName().substring(5));
  187. GameRegistry.registerItem(yoshiLeggings, yoshiLeggings.getUnlocalizedName().substring(5));
  188. GameRegistry.registerItem(yoshiBoots, yoshiBoots.getUnlocalizedName().substring(5));
  189.  
  190. //System.out
  191. System.out.println(blockCaveRock.getUnlocalizedName().substring(5));
  192. System.out.println(blockSpirit.getUnlocalizedName().substring(5));
  193. System.out.println(blockTongue.getUnlocalizedName().substring(5));
  194. System.out.println(blockLantern.getUnlocalizedName().substring(5));
  195. System.out.println(blockTable.getUnlocalizedName().substring(5));
  196. System.out.println(blockYoshi.getUnlocalizedName().substring(5));
  197. System.out.println(blockSpiritOre.getUnlocalizedName().substring(5));
  198. System.out.println(blockTongueOre.getUnlocalizedName().substring(5));
  199. System.out.println(blockYoshiOre.getUnlocalizedName().substring(5));
  200. System.out.println(blockYoshiTrophy.getUnlocalizedName().substring(5));
  201. System.out.println(blockEndTongueOre.getUnlocalizedName().substring(5));
  202. System.out.println(blockNetherTongueOre.getUnlocalizedName().substring(5));
  203. System.out.println(blockYoshiGlass.getUnlocalizedName().substring(5));
  204. System.out.println(blockSurface.getUnlocalizedName().substring(5));
  205. System.out.println(yoshiPortal.getUnlocalizedName().substring(5));
  206. //World Generation
  207. GameRegistry.registerWorldGenerator(new OreGeneration(), 0);
  208.  
  209. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement