palmerjj01

Main Class

Oct 11th, 2014
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.65 KB | None | 0 0
  1. package palmerjj01.YoshiCraft;
  2.  
  3. import net.minecraft.block.Block;
  4. import net.minecraft.block.material.Material;
  5. import net.minecraft.creativetab.CreativeTabs;
  6. import net.minecraft.init.Blocks;
  7. import net.minecraft.init.Items;
  8. import net.minecraft.item.Item;
  9. import net.minecraft.item.ItemArmor;
  10. import net.minecraft.item.ItemFood;
  11. import net.minecraft.item.ItemStack;
  12. import net.minecraftforge.common.util.EnumHelper;
  13. import palmerjj01.YoshiCraft.Entity.YCEntity;
  14. import palmerjj01.YoshiCraft.Grenades.ItemYoshiGrenade;
  15. import palmerjj01.YoshiCraft.Gui.GuiHandler;
  16. import palmerjj01.YoshiCraft.Machines.YoshiOven;
  17. import palmerjj01.YoshiCraft.Main.ServerProxy;
  18. import palmerjj01.YoshiCraft.TileEntity.TileEntityYoshiOven;
  19. import palmerjj01.YoshiCraft.WorldGen.YCWorldGen;
  20. import palmerjj01.YoshiCraft.WorldGen.Biome.BiomesYC;
  21. import ToolsArmour.ItemLegendaryPickaxe;
  22. import ToolsArmour.ItemLegendarySword;
  23. import ToolsArmour.ItemSpiritArmour;
  24. import ToolsArmour.ItemSpiritAxe;
  25. import ToolsArmour.ItemSpiritHoe;
  26. import ToolsArmour.ItemSpiritPickaxe;
  27. import ToolsArmour.ItemSpiritShovel;
  28. import ToolsArmour.ItemSpiritSword;
  29. import ToolsArmour.ItemTongueArmour;
  30. import ToolsArmour.ItemTongueAxe;
  31. import ToolsArmour.ItemTongueHoe;
  32. import ToolsArmour.ItemTonguePickaxe;
  33. import ToolsArmour.ItemTongueShovel;
  34. import ToolsArmour.ItemTongueSword;
  35. import ToolsArmour.ItemYoshiArmour;
  36. import cpw.mods.fml.common.Mod;
  37. import cpw.mods.fml.common.Mod.EventHandler;
  38. import cpw.mods.fml.common.Mod.Instance;
  39. import cpw.mods.fml.common.SidedProxy;
  40. import cpw.mods.fml.common.event.FMLInitializationEvent;
  41. import cpw.mods.fml.common.event.FMLPostInitializationEvent;
  42. import cpw.mods.fml.common.event.FMLPreInitializationEvent;
  43. import cpw.mods.fml.common.network.NetworkRegistry;
  44. import cpw.mods.fml.common.registry.GameRegistry;
  45.  
  46. @Mod(modid = "yc", name = "YoshiCraft", version = "1.5")
  47. public class YoshiCraft {
  48.  
  49. @SidedProxy(clientSide = "palmerjj01.YoshiCraft.Main.ClientProxy", serverSide = "palmerjj01.YoshiCraft.Main.ServerProxy")
  50. public static ServerProxy proxy;
  51.  
  52. @Instance
  53. public static YoshiCraft instance;
  54.  
  55. //Items
  56. public static Item itemTable;
  57. public static Item itemStick;
  58. public static Item itemCaveShard;
  59. public static Item itemCocoPowder;
  60. public static Item itemYoshiDroppings;
  61.  
  62. //Grenades
  63. public static Item itemYoshiGrenade;
  64.  
  65. //Ingots
  66. public static Item itemIngot;
  67. public static Item itemSpiritIngot;
  68. public static Item itemYoshiIngot;
  69.  
  70. //Ingot Alternatives
  71. public static Item itemTonguePebble;
  72.  
  73. //Food
  74. public static Item itemTongue;
  75. public static Item itemHotTongue;
  76. public static Item itemBerry;
  77. public static Item itemDuckBread;
  78. public static Item itemAdventureChocolate;
  79. public static Item itemAdventurePoo;
  80. public static Item itemChocolateBar;
  81. public static Item itemMuffin;
  82. public static Item itemGrannySmithApple;
  83. public static Item itemApplePie;
  84. public static Item itemHotApplePie;
  85. public static Item itemBaconRaw;
  86. public static Item itemBacon;
  87.  
  88. //Blocks
  89. public static Block blockTable;
  90. public static Block blockLantern;
  91. public static Block blockTongue;
  92. public static Block blockSpirit;
  93. public static Block blockCaveRock;
  94. public static Block blockYoshi;
  95. public static Block blockYoshiTrophy;
  96. public static Block blockYoshiGlass;
  97. public static Block blockSurface;
  98.  
  99. //Portal
  100.  
  101. //Chests
  102.  
  103. //Furnaces
  104. public static Block yoshiOvenIdle;
  105. public static Block yoshiOvenActive;
  106. public static final int guiIDYoshiOven = 0;
  107.  
  108. //Ores
  109. public static Block blockSpiritOre;
  110. public static Block blockTongueOre;
  111. public static Block blockYoshiOre;
  112. public static Block blockEndTongueOre;
  113. public static Block blockNetherTongueOre;
  114.  
  115. //Tools
  116. public static Item legendarySword;
  117. public static Item legendaryPickaxe;
  118. public static Item spiritPickaxe;
  119. public static Item spiritAxe;
  120. public static Item spiritShovel;
  121. public static Item spiritHoe;
  122. public static Item spiritSword;
  123. public static Item tonguePickaxe;
  124. public static Item tongueAxe;
  125. public static Item tongueShovel;
  126. public static Item tongueHoe;
  127. public static Item tongueSword;
  128.  
  129. //Armour
  130. public static Item spiritHelmet;
  131. public static Item spiritChestplate;
  132. public static Item spiritLeggings;
  133. public static Item spiritBoots;
  134. //
  135. public static Item tongueHelmet;
  136. public static Item tongueChestplate;
  137. public static Item tongueLeggings;
  138. public static Item tongueBoots;
  139. //
  140. public static Item yoshiHelmet;
  141. public static Item yoshiChestplate;
  142. public static Item yoshiLeggings;
  143. public static Item yoshiBoots;
  144.  
  145. //Materials
  146. public static final Item.ToolMaterial legendaryToolMaterial = EnumHelper.addToolMaterial("legendaryToolMaterial", 5, 999999999, 500.0F, 200.0F, 100);
  147. public static final Item.ToolMaterial tongueToolMaterial = EnumHelper.addToolMaterial("tongueToolMaterial", 2, 500, 4.0F, 1.0F, 5);
  148. public static final Item.ToolMaterial spiritToolMaterial = EnumHelper.addToolMaterial("spiritToolMaterial", 4, 999999, 150.0F, 40.0F, 30);
  149. public static final ItemArmor.ArmorMaterial spiritArmourMaterial = EnumHelper.addArmorMaterial("spiritArmourMaterial", 500, new int[]{20, 20, 20, 20}, 10);
  150. public static final ItemArmor.ArmorMaterial tongueArmourMaterial = EnumHelper.addArmorMaterial("tongueArmourMaterial", 10, new int[]{2, 5, 4, 1}, 5);
  151. public static final ItemArmor.ArmorMaterial yoshiArmourMaterial = EnumHelper.addArmorMaterial("yoshiArmourMaterial", 15, new int[]{2, 6, 5, 2}, 9);
  152.  
  153. @EventHandler
  154. public void preInit(FMLPreInitializationEvent event) {
  155. //Item/Block init and registering
  156. //Config handling
  157. YCEntity.mainRegistry();
  158.  
  159. //Items
  160. itemTable = new ItemTable().setUnlocalizedName("ItemTable").setTextureName("yc:itemtable");
  161. itemStick = new ItemStick().setUnlocalizedName("ItemStick").setTextureName("yc:itemstick").setCreativeTab(tabYoshiCraft);
  162. itemCaveShard = new ItemCaveShard().setUnlocalizedName("ItemCaveShard").setTextureName("yc:itemcaveshhard").setCreativeTab(tabYoshiCraft);
  163. itemCocoPowder = new ItemCocoPowder().setUnlocalizedName("ItemCocoPowder").setTextureName("yc:itemcocopowder").setCreativeTab(tabYoshiCraft);
  164. itemYoshiDroppings = new ItemYoshiDroppings().setUnlocalizedName("ItemYoshiDroppings").setTextureName("yc:itemyoshimess").setCreativeTab(tabYoshiCraft);
  165.  
  166. //Grenades
  167. itemYoshiGrenade = new ItemYoshiGrenade().setUnlocalizedName("ItemYoshiGrenade").setTextureName("yc:itemyoshigrenade").setCreativeTab(tabYoshiCraft);
  168.  
  169. //Ingots
  170. itemIngot = new ItemIngot().setUnlocalizedName("ItemIngot").setTextureName("yc:itemingot").setCreativeTab(tabYoshiCraft);
  171. itemSpiritIngot = new ItemSpiritIngot().setUnlocalizedName("ItemSpiritIngot").setTextureName("yc:itemspiritingot").setCreativeTab(tabYoshiCraft);
  172. itemYoshiIngot = new ItemYoshiIngot().setUnlocalizedName("ItemYoshiIngot").setTextureName("yc:itemyoshiingot").setCreativeTab(tabYoshiCraft);
  173.  
  174. //Ingot Alternatives
  175. itemTonguePebble = new ItemTonguePebble().setUnlocalizedName("ItemTonguePebble").setTextureName("yc:tonguepebble").setCreativeTab(tabYoshiCraft);
  176.  
  177. //Food
  178. itemTongue = new FoodTongue(8, 0.6F, false).setUnlocalizedName("ItemTongue").setTextureName("yc:itemtongue").setCreativeTab(tabYoshiCraft);
  179. itemHotTongue = new ItemFood(16, 0.8F, true).setUnlocalizedName("ItemHotTongue").setTextureName("yc:itemhottongue").setCreativeTab(tabYoshiCraft);
  180. itemBerry = new ItemFood(2, 0.3F, false).setUnlocalizedName("ItemBerry").setTextureName("yc:itemberry").setCreativeTab(tabYoshiCraft);
  181. itemDuckBread = new FoodDuckBread(6, 0.6F, false).setUnlocalizedName("ItemDuckBread").setTextureName("yc:sqaisheybread").setCreativeTab(tabYoshiCraft);
  182. itemAdventureChocolate = new FoodAdventureChocolate(6, 0.6F, false).setUnlocalizedName("ItemAdventureChocolate").setTextureName("yc:itemadventurechocolate").setCreativeTab(tabYoshiCraft);
  183. itemAdventurePoo = new FoodAdventurePoo(1, 0.1F, false).setUnlocalizedName("ItemAdventurePoo").setTextureName("yc:itemadventurepoo").setCreativeTab(tabYoshiCraft);
  184. itemChocolateBar = new ItemFood(4, 0.5F, false).setUnlocalizedName("ItemChocolateBar").setTextureName("yc:itemchocolatebar").setCreativeTab(tabYoshiCraft);
  185. itemMuffin = new ItemFood(4, 0.6F, false).setUnlocalizedName("ItemMuffin").setTextureName("yc:itemmuffin").setCreativeTab(tabYoshiCraft);
  186. itemGrannySmithApple = new ItemFood(4, 0.4F, false).setUnlocalizedName("ItemGrannySmithApple").setTextureName("yc:grannysmithapple").setCreativeTab(tabYoshiCraft);
  187. itemApplePie = new FoodApplePie(5, 0.5F, false).setUnlocalizedName("ItemApplePie").setTextureName("yc:applepie").setCreativeTab(tabYoshiCraft);
  188. itemHotApplePie = new FoodWarmApplePie(6, 0.8F, false).setUnlocalizedName("ItemHotApplePie").setTextureName("yc:hotapplepie").setCreativeTab(tabYoshiCraft);
  189. itemBaconRaw = new ItemFood(4, 0.5F, true).setUnlocalizedName("ItemBaconRaw").setTextureName("yc:baconraw").setCreativeTab(tabYoshiCraft);
  190. itemBacon = new ItemFood(8, 0.8F, true).setUnlocalizedName("ItemBacon").setTextureName("yc:bacon").setCreativeTab(tabYoshiCraft);
  191.  
  192. //Blocks
  193. blockTable = new BlockTable(Material.rock).setBlockName("BlockTable").setBlockTextureName("yc:blocktable").setCreativeTab(tabYoshiCraft);
  194. blockLantern = new BlockLantern(Material.rock).setBlockName("BlockLantern").setBlockTextureName("yc:blocklantern").setCreativeTab(tabYoshiCraft);
  195. blockTongue = new BlockTongue(Material.leaves).setBlockName("BlockTongue").setBlockTextureName("yc:blocktongue").setCreativeTab(tabYoshiCraft);
  196. blockSpirit = new BlockSpirit(Material.anvil).setBlockName("BlockSpirit").setBlockTextureName("yc:blockspirit").setCreativeTab(tabYoshiCraft);
  197. blockCaveRock = new BlockCaveRock(Material.rock).setBlockName("BlockCaveRock").setBlockTextureName("yc:blockcaverock").setCreativeTab(tabYoshiCraft);
  198. blockYoshi = new BlockYoshi(Material.rock).setBlockName("BlockYoshi").setCreativeTab(tabYoshiCraft);
  199. blockYoshiTrophy = new BlockYoshiTrophy(Material.iron).setBlockName("BlockYoshiTrophy").setBlockTextureName("yc:").setCreativeTab(tabYoshiCraft);
  200. blockYoshiGlass = new BlockYoshiGlass(Material.glass).setBlockName("BlockYoshiGlass").setBlockTextureName("yc:yoshiglass");
  201. blockSurface = new BlockSurface(Material.rock).setBlockName("BlockSurface").setBlockTextureName("yc:surface").setCreativeTab(tabYoshiCraft);
  202.  
  203. //Portal
  204.  
  205. //Chests
  206.  
  207. //Furnaces
  208. yoshiOvenIdle = new YoshiOven(false).setBlockName("YoshiOvenIdle").setCreativeTab(tabYoshiCraft);
  209. yoshiOvenActive = new YoshiOven(true).setBlockName("YoshiOvenActive");
  210.  
  211. //Ores
  212. blockSpiritOre = new BlockSpiritOre(Material.rock).setBlockName("BlockSpiritOre").setBlockTextureName("yc:blockspiritore").setCreativeTab(tabYoshiCraft);
  213. blockTongueOre = new BlockTongueOre(Material.rock).setBlockName("BlockTongueOre").setBlockTextureName("yc:blocktongueore").setCreativeTab(tabYoshiCraft);
  214. blockYoshiOre = new BlockYoshiOre(Material.rock).setBlockName("BlockYoshiOre").setBlockTextureName("yc:blockyoshiore").setCreativeTab(tabYoshiCraft);
  215. blockEndTongueOre = new BlockEndTongueOre(Material.rock).setBlockName("BlockEndTongueOre").setBlockTextureName("yc:endtongueore").setCreativeTab(tabYoshiCraft);
  216. blockNetherTongueOre = new BlockNetherTongueOre(Material.rock).setBlockName("BlockNetherTongueOre").setBlockTextureName("yc:nethertongueore").setCreativeTab(tabYoshiCraft);
  217.  
  218. //Tools
  219. legendarySword = new ItemLegendarySword(legendaryToolMaterial).setUnlocalizedName("ItemLegendarySword").setTextureName("yc:itemlegendarysword").setCreativeTab(tabYoshiCraft);
  220. legendaryPickaxe = new ItemLegendaryPickaxe(legendaryToolMaterial).setUnlocalizedName("ItemLegendaryPickaxe").setTextureName("yc:itemlegendarypickaxe").setCreativeTab(tabYoshiCraft);
  221. spiritPickaxe = new ItemSpiritPickaxe(spiritToolMaterial).setUnlocalizedName("ItemSpiritPickaxe").setTextureName("yc:itemspiritpickaxe").setCreativeTab(tabYoshiCraft);
  222. spiritAxe = new ItemSpiritAxe(spiritToolMaterial).setUnlocalizedName("ItemSpiritAxe").setTextureName("yc:itemspiritaxe").setCreativeTab(tabYoshiCraft);
  223. spiritShovel = new ItemSpiritShovel(spiritToolMaterial).setUnlocalizedName("ItemSpiritShovel").setTextureName("yc:itemspiritshovel").setCreativeTab(tabYoshiCraft);
  224. spiritHoe = new ItemSpiritHoe(spiritToolMaterial).setUnlocalizedName("ItemSpiritHoe").setTextureName("yc:itemspirithoe").setCreativeTab(tabYoshiCraft);
  225. spiritSword = new ItemSpiritSword(spiritToolMaterial).setUnlocalizedName("ItemSpiritSword").setTextureName("yc:itemspiritsword").setCreativeTab(tabYoshiCraft);
  226. tonguePickaxe = new ItemTonguePickaxe(tongueToolMaterial).setUnlocalizedName("ItemTonguePickaxe").setTextureName("yc:itemtonguepickaxe").setCreativeTab(tabYoshiCraft);
  227. tongueAxe = new ItemTongueAxe(tongueToolMaterial).setUnlocalizedName("ItemTongueAxe").setTextureName("yc:itemtongueaxe").setCreativeTab(tabYoshiCraft);
  228. tongueShovel = new ItemTongueShovel(tongueToolMaterial).setUnlocalizedName("ItemTongueShovel").setTextureName("yc:itemtongueshovel").setCreativeTab(tabYoshiCraft);
  229. tongueHoe = new ItemTongueHoe(tongueToolMaterial).setUnlocalizedName("ItemTongueHoe").setTextureName("yc:itemtonguehoe").setCreativeTab(tabYoshiCraft);
  230. tongueSword = new ItemTongueSword(tongueToolMaterial).setUnlocalizedName("ItemTongueSword").setTextureName("yc:itemtonguesword").setCreativeTab(tabYoshiCraft);
  231.  
  232. //Armour
  233. spiritHelmet = new ItemSpiritArmour(spiritArmourMaterial, 0, 0).setUnlocalizedName("ItemSpiritHelmet").setTextureName("yc:itemspirithelmet").setCreativeTab(tabYoshiCraft);
  234. spiritChestplate = new ItemSpiritArmour(spiritArmourMaterial, 0, 1).setUnlocalizedName("ItemSpiritChestplate").setTextureName("yc:itemspiritchestplate").setCreativeTab(tabYoshiCraft);
  235. spiritLeggings = new ItemSpiritArmour(spiritArmourMaterial, 0, 2).setUnlocalizedName("ItemSpiritLeggings").setTextureName("yc:itemspiritleggings").setCreativeTab(tabYoshiCraft);
  236. spiritBoots = new ItemSpiritArmour(spiritArmourMaterial, 0, 3).setUnlocalizedName("ItemSpiritBoots").setTextureName("yc:itemspiritboots").setCreativeTab(tabYoshiCraft);
  237. //
  238. tongueHelmet = new ItemTongueArmour(tongueArmourMaterial, 0, 0).setUnlocalizedName("ItemTongueHelmet").setTextureName("yc:itemtonguehelmet").setCreativeTab(tabYoshiCraft);
  239. tongueChestplate = new ItemTongueArmour(tongueArmourMaterial, 0, 1).setUnlocalizedName("ItemTongueChestplate").setTextureName("yc:itemtonguechestplate").setCreativeTab(tabYoshiCraft);
  240. tongueLeggings = new ItemTongueArmour(tongueArmourMaterial, 0, 2).setUnlocalizedName("ItemTongueLeggings").setTextureName("yc:itemtongueleggings").setCreativeTab(tabYoshiCraft);
  241. tongueBoots = new ItemTongueArmour(tongueArmourMaterial, 0, 3).setUnlocalizedName("ItemTongueBoots").setTextureName("yc:itemtongueboots").setCreativeTab(tabYoshiCraft);
  242. //
  243. yoshiHelmet = new ItemYoshiArmour(yoshiArmourMaterial, 0, 0).setUnlocalizedName("ItemYoshiHelmet").setTextureName("yc:itemyoshihelmet").setCreativeTab(tabYoshiCraft);
  244. yoshiChestplate = new ItemYoshiArmour(yoshiArmourMaterial, 0, 1).setUnlocalizedName("ItemYoshiChestplate").setTextureName("yc:itemyoshichestplate").setCreativeTab(tabYoshiCraft);
  245. yoshiLeggings = new ItemYoshiArmour(yoshiArmourMaterial, 0, 2).setUnlocalizedName("ItemYoshiLeggings").setTextureName("yc:itemyoshileggings").setCreativeTab(tabYoshiCraft);
  246. yoshiBoots = new ItemYoshiArmour(yoshiArmourMaterial, 0, 3).setUnlocalizedName("ItemYoshiBoots").setTextureName("yc:itemyoshiboots").setCreativeTab(tabYoshiCraft);
  247.  
  248. //Biomes
  249. BiomesYC.init();
  250.  
  251. //Registry
  252.  
  253. //Items
  254. GameRegistry.registerItem(itemTable, itemTable.getUnlocalizedName().substring(5));
  255. GameRegistry.registerItem(itemStick, itemStick.getUnlocalizedName().substring(5));
  256. GameRegistry.registerItem(itemCaveShard, itemCaveShard.getUnlocalizedName().substring(5));
  257. GameRegistry.registerItem(itemCocoPowder, itemCocoPowder.getUnlocalizedName().substring(5));
  258. GameRegistry.registerItem(itemYoshiDroppings, itemYoshiDroppings.getUnlocalizedName().substring(5));
  259.  
  260. //Grenades
  261. GameRegistry.registerItem(itemYoshiGrenade, itemYoshiGrenade.getUnlocalizedName().substring(5));
  262.  
  263. //Ingots
  264. GameRegistry.registerItem(itemIngot, itemIngot.getUnlocalizedName().substring(5));
  265. GameRegistry.registerItem(itemSpiritIngot, itemSpiritIngot.getUnlocalizedName().substring(5));
  266. GameRegistry.registerItem(itemYoshiIngot, itemYoshiIngot.getUnlocalizedName().substring(5));
  267. //Ingot Alternatives
  268. GameRegistry.registerItem(itemTonguePebble, itemTonguePebble.getUnlocalizedName().substring(5));
  269.  
  270. //Food
  271. GameRegistry.registerItem(itemTongue, itemTongue.getUnlocalizedName().substring(5));
  272. GameRegistry.registerItem(itemHotTongue, itemHotTongue.getUnlocalizedName().substring(5));
  273. GameRegistry.registerItem(itemBerry, itemBerry.getUnlocalizedName().substring(5));
  274. GameRegistry.registerItem(itemDuckBread, itemDuckBread.getUnlocalizedName().substring(5));
  275. GameRegistry.registerItem(itemAdventureChocolate, itemAdventureChocolate.getUnlocalizedName().substring(5));
  276. GameRegistry.registerItem(itemAdventurePoo, itemAdventurePoo.getUnlocalizedName().substring(5));
  277. GameRegistry.registerItem(itemChocolateBar, itemChocolateBar.getUnlocalizedName().substring(5));
  278. GameRegistry.registerItem(itemMuffin, itemMuffin.getUnlocalizedName().substring(5));
  279. GameRegistry.registerItem(itemGrannySmithApple, itemGrannySmithApple.getUnlocalizedName().substring(5));
  280. GameRegistry.registerItem(itemApplePie, itemApplePie.getUnlocalizedName().substring(5));
  281. GameRegistry.registerItem(itemHotApplePie, itemHotApplePie.getUnlocalizedName().substring(5));
  282. GameRegistry.registerItem(itemBaconRaw, itemBaconRaw.getUnlocalizedName().substring(5));
  283. GameRegistry.registerItem(itemBacon, itemBacon.getUnlocalizedName().substring(5));
  284.  
  285. //Blocks
  286. GameRegistry.registerBlock(blockTable, blockTable.getUnlocalizedName().substring(5));
  287. GameRegistry.registerBlock(blockLantern, blockLantern.getUnlocalizedName().substring(5));
  288. GameRegistry.registerBlock(blockTongue, blockTongue.getUnlocalizedName().substring(5));
  289. GameRegistry.registerBlock(blockSpirit, blockSpirit.getUnlocalizedName().substring(5));
  290. GameRegistry.registerBlock(blockCaveRock, blockCaveRock.getUnlocalizedName().substring(5));
  291. GameRegistry.registerBlock(blockYoshi, blockYoshi.getUnlocalizedName().substring(5));
  292. GameRegistry.registerBlock(blockYoshiTrophy, blockYoshiTrophy.getUnlocalizedName().substring(5));
  293. GameRegistry.registerBlock(blockYoshiGlass, blockYoshiGlass.getUnlocalizedName().substring(5));
  294. GameRegistry.registerBlock(blockSurface, blockSurface.getUnlocalizedName().substring(5));
  295.  
  296. //Portal
  297.  
  298. //Chests
  299.  
  300. //Furnaces
  301. GameRegistry.registerBlock(yoshiOvenIdle, yoshiOvenIdle.getUnlocalizedName().substring(5));
  302. GameRegistry.registerBlock(yoshiOvenActive, yoshiOvenActive.getUnlocalizedName().substring(5));
  303.  
  304. //Ores
  305. GameRegistry.registerBlock(blockSpiritOre, blockSpiritOre.getUnlocalizedName().substring(5));
  306. GameRegistry.registerBlock(blockTongueOre, blockTongueOre.getUnlocalizedName().substring(5));
  307. GameRegistry.registerBlock(blockYoshiOre, blockYoshiOre.getUnlocalizedName().substring(5));
  308. GameRegistry.registerBlock(blockEndTongueOre, blockEndTongueOre.getUnlocalizedName().substring(5));
  309. GameRegistry.registerBlock(blockNetherTongueOre, blockNetherTongueOre.getUnlocalizedName().substring(5));
  310.  
  311. //Tools
  312. GameRegistry.registerItem(legendarySword, legendarySword.getUnlocalizedName().substring(5));
  313. GameRegistry.registerItem(legendaryPickaxe, legendaryPickaxe.getUnlocalizedName().substring(5));
  314. GameRegistry.registerItem(spiritPickaxe, spiritPickaxe.getUnlocalizedName().substring(5));
  315. GameRegistry.registerItem(spiritAxe, spiritAxe.getUnlocalizedName().substring(5));
  316. GameRegistry.registerItem(spiritShovel, spiritShovel.getUnlocalizedName().substring(5));
  317. GameRegistry.registerItem(spiritHoe, spiritHoe.getUnlocalizedName().substring(5));
  318. GameRegistry.registerItem(spiritSword, spiritSword.getUnlocalizedName().substring(5));
  319. GameRegistry.registerItem(tonguePickaxe, tonguePickaxe.getUnlocalizedName().substring(5));
  320. GameRegistry.registerItem(tongueAxe, tongueAxe.getUnlocalizedName().substring(5));
  321. GameRegistry.registerItem(tongueShovel, tongueShovel.getUnlocalizedName().substring(5));
  322. GameRegistry.registerItem(tongueHoe, tongueHoe.getUnlocalizedName().substring(5));
  323. GameRegistry.registerItem(tongueSword, tongueSword.getUnlocalizedName().substring(5));
  324.  
  325. //Armour
  326. GameRegistry.registerItem(spiritHelmet, spiritHelmet.getUnlocalizedName().substring(5));
  327. GameRegistry.registerItem(spiritChestplate, spiritChestplate.getUnlocalizedName().substring(5));
  328. GameRegistry.registerItem(spiritLeggings, spiritLeggings.getUnlocalizedName().substring(5));
  329. GameRegistry.registerItem(spiritBoots, spiritBoots.getUnlocalizedName().substring(5));
  330. //
  331. GameRegistry.registerItem(tongueHelmet, tongueHelmet.getUnlocalizedName().substring(5));
  332. GameRegistry.registerItem(tongueChestplate, tongueChestplate.getUnlocalizedName().substring(5));
  333. GameRegistry.registerItem(tongueLeggings, tongueLeggings.getUnlocalizedName().substring(5));
  334. GameRegistry.registerItem(tongueBoots, tongueBoots.getUnlocalizedName().substring(5));
  335. //
  336. GameRegistry.registerItem(yoshiHelmet, yoshiHelmet.getUnlocalizedName().substring(5));
  337. GameRegistry.registerItem(yoshiChestplate, yoshiChestplate.getUnlocalizedName().substring(5));
  338. GameRegistry.registerItem(yoshiLeggings, yoshiLeggings.getUnlocalizedName().substring(5));
  339. GameRegistry.registerItem(yoshiBoots, yoshiBoots.getUnlocalizedName().substring(5));
  340.  
  341. //System.out
  342. System.out.println(blockCaveRock.getUnlocalizedName().substring(5));
  343. System.out.println(blockSpirit.getUnlocalizedName().substring(5));
  344. System.out.println(blockTongue.getUnlocalizedName().substring(5));
  345. System.out.println(blockLantern.getUnlocalizedName().substring(5));
  346. System.out.println(blockTable.getUnlocalizedName().substring(5));
  347. System.out.println(blockYoshi.getUnlocalizedName().substring(5));
  348. System.out.println(blockSpiritOre.getUnlocalizedName().substring(5));
  349. System.out.println(blockTongueOre.getUnlocalizedName().substring(5));
  350. System.out.println(blockYoshiOre.getUnlocalizedName().substring(5));
  351. System.out.println(blockYoshiTrophy.getUnlocalizedName().substring(5));
  352. System.out.println(blockEndTongueOre.getUnlocalizedName().substring(5));
  353. System.out.println(blockNetherTongueOre.getUnlocalizedName().substring(5));
  354. System.out.println(blockYoshiGlass.getUnlocalizedName().substring(5));
  355. System.out.println(blockSurface.getUnlocalizedName().substring(5));
  356.  
  357. //World Generation
  358. GameRegistry.registerWorldGenerator(new OreGeneration(), 0);
  359.  
  360. }
  361.  
  362. @EventHandler
  363. public void init(FMLInitializationEvent event) {
  364. //Proxy, TileEntity, entity, GUI and Packet Registering
  365. //Crafting and Smelting
  366.  
  367. NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
  368.  
  369. //Tile Entity
  370. GameRegistry.registerTileEntity(TileEntityYoshiOven.class, "YoshiOven");
  371.  
  372. //Items
  373. GameRegistry.addRecipe(new ItemStack(itemStick, 8), new Object[]{"sss","sds","sss", 's', Items.stick, 'd', Items.emerald});
  374. GameRegistry.addRecipe(new ItemStack(itemCocoPowder, 16), new Object[]{"c", 'c', new ItemStack(Items.dye, 1, 3)});
  375.  
  376. //Grenades
  377. GameRegistry.addRecipe(new ItemStack(itemYoshiGrenade), new Object[]{"yiy", "yty", "yyy", 'y', itemYoshiIngot, 'i', Items.iron_ingot, 't', Blocks.tnt});
  378.  
  379. //Food
  380. GameRegistry.addRecipe(new ItemStack(itemTongue, 8), new Object[]{"ttt","tst","ttt", 't', itemIngot, 's', Items.sugar});
  381. GameRegistry.addRecipe(new ItemStack(itemAdventureChocolate, 8), new Object[]{"BBB","BBB","MMM", 'M', Items.milk_bucket, 'B', itemCocoPowder});
  382. GameRegistry.addRecipe(new ItemStack(itemAdventurePoo), new Object[]{"ppp","ppp","mmm", 'p', itemYoshiDroppings, 'm', Items.milk_bucket});
  383. GameRegistry.addRecipe(new ItemStack(itemChocolateBar), new Object[]{"cc","cc","mc", 'c', itemCocoPowder, 'm', Items.milk_bucket});
  384. GameRegistry.addRecipe(new ItemStack(itemMuffin), new Object[]{"ecw","pmp","sps", 'e', Items.egg, 'c', itemCocoPowder, 'w', Items.wheat, 'p', Items.paper, 'm', Items.milk_bucket, 's', Items.sugar});
  385. GameRegistry.addRecipe(new ItemStack(itemApplePie), new Object[]{"waw","ses","www", 'w', Items.wheat, 'a', itemGrannySmithApple, 's', Items.sugar, 'e', Items.egg});
  386. GameRegistry.addRecipe(new ItemStack(itemGrannySmithApple, 8), new Object[]{"aaa","aea","aaa", 'a', Items.apple, 'e', Items.emerald});
  387. GameRegistry.addRecipe(new ItemStack(itemBaconRaw), new Object[]{"p", 'p', Items.porkchop});
  388.  
  389. //Food Smelting
  390. GameRegistry.addSmelting(itemTongue, new ItemStack(itemHotTongue), 2.0F);
  391. GameRegistry.addSmelting(itemApplePie, new ItemStack(itemHotApplePie), 2.0F);
  392. GameRegistry.addSmelting(itemBaconRaw, new ItemStack(itemBacon), 2.0F);
  393.  
  394. //Blocks
  395. GameRegistry.addRecipe(new ItemStack(blockTable), new Object[]{"TTT","S S","S S", 'T', blockTongue, 'S', itemStick});
  396. GameRegistry.addRecipe(new ItemStack(blockLantern), new Object[]{"sss","sgs","sss", 's', itemStick, 'g', Blocks.glowstone});
  397. GameRegistry.addRecipe(new ItemStack(blockSpirit), new Object[]{"sss","sss","sss", 's', itemSpiritIngot});
  398. GameRegistry.addRecipe(new ItemStack(blockTongue), new Object[]{"ttt","ttt","ttt", 't', itemIngot});
  399. GameRegistry.addRecipe(new ItemStack(blockYoshi), new Object[]{"sss", "sss", "sss", 's', itemYoshiIngot});
  400. GameRegistry.addRecipe(new ItemStack(blockCaveRock), new Object[]{"ss", "ss", 's', itemCaveShard});
  401. GameRegistry.addRecipe(new ItemStack(blockYoshiGlass, 8), new Object[]{"ggg","gyg","ggg", 'g', Blocks.glass, 'y', itemYoshiIngot});
  402.  
  403. //Ore Smelting
  404. GameRegistry.addSmelting(blockSpiritOre, new ItemStack(itemSpiritIngot), 5000.0F);
  405. GameRegistry.addSmelting(blockTongueOre, new ItemStack(itemIngot), 2.0F);
  406. GameRegistry.addSmelting(blockYoshiOre, new ItemStack(itemYoshiIngot), 3.0F);
  407. GameRegistry.addSmelting(blockEndTongueOre, new ItemStack(itemIngot), 2.0F);
  408.  
  409. //Ingots
  410. GameRegistry.addRecipe(new ItemStack(itemIngot), new Object[]{"PP", 'P', itemTonguePebble});
  411. //Tools
  412. GameRegistry.addRecipe(new ItemStack(spiritPickaxe), new Object[]{"sss"," l "," l ", 's', itemSpiritIngot, 'l', itemStick});
  413. GameRegistry.addRecipe(new ItemStack(spiritAxe), new Object[]{"ss","sl"," l", 's', itemSpiritIngot, 'l', itemStick});
  414. GameRegistry.addRecipe(new ItemStack(spiritShovel), new Object[]{"s","l","l", 's', itemSpiritIngot, 'l', itemStick});
  415. GameRegistry.addRecipe(new ItemStack(spiritHoe), new Object[]{"ss"," l"," l", 's', itemSpiritIngot, 'l', itemStick});
  416. GameRegistry.addRecipe(new ItemStack(spiritSword), new Object[]{"s","s","l", 's', itemSpiritIngot, 'l', itemStick});
  417. GameRegistry.addRecipe(new ItemStack(tonguePickaxe), new Object[]{"ttt"," l "," l ", 't', itemIngot, 'l', itemStick});
  418. GameRegistry.addRecipe(new ItemStack(tongueAxe), new Object[]{"tt","tl"," l", 't', itemIngot, 'l', itemStick});
  419. GameRegistry.addRecipe(new ItemStack(tongueShovel), new Object[]{"t","l","l", 't', itemIngot, 'l', itemStick});
  420. GameRegistry.addRecipe(new ItemStack(tongueHoe), new Object[]{"tt"," l"," l", 't', itemIngot, 'l', itemStick});
  421. GameRegistry.addRecipe(new ItemStack(tongueSword), new Object[]{"t","t","l", 't', itemIngot, 'l', itemStick});
  422.  
  423. //Armour
  424. GameRegistry.addRecipe(new ItemStack(spiritHelmet), new Object[]{"sss", "s s", 's', itemSpiritIngot});
  425. GameRegistry.addRecipe(new ItemStack(spiritChestplate), new Object[]{"s s", "sss", "sss", 's', itemSpiritIngot});
  426. GameRegistry.addRecipe(new ItemStack(spiritLeggings), new Object[]{"sss", "s s", "s s", 's', itemSpiritIngot});
  427. GameRegistry.addRecipe(new ItemStack(spiritBoots), new Object[]{"s s", "s s", 's', itemSpiritIngot});
  428. //
  429. GameRegistry.addRecipe(new ItemStack(tongueHelmet), new Object[]{"ttt", "t t", 't', itemIngot});
  430. GameRegistry.addRecipe(new ItemStack(tongueChestplate), new Object[]{"t t", "ttt", "ttt", 't', itemIngot});
  431. GameRegistry.addRecipe(new ItemStack(tongueLeggings), new Object[]{"ttt", "t t", "t t", 't', itemIngot});
  432. GameRegistry.addRecipe(new ItemStack(tongueBoots), new Object[]{"t t", "t t", 't', itemIngot});
  433. //
  434. GameRegistry.addRecipe(new ItemStack(yoshiHelmet), new Object[]{"yyy", "y y", 'y', itemYoshiIngot});
  435. GameRegistry.addRecipe(new ItemStack(yoshiChestplate), new Object[]{"y y", "yyy", "yyy", 'y', itemYoshiIngot});
  436. GameRegistry.addRecipe(new ItemStack(yoshiLeggings), new Object[]{"yyy", "y y", "y y", 'y', itemYoshiIngot});
  437. GameRegistry.addRecipe(new ItemStack(yoshiBoots), new Object[]{"y y", "y y", 'y', itemYoshiIngot});
  438.  
  439. }
  440.  
  441. @EventHandler
  442. public void postInit(FMLPostInitializationEvent event) {
  443. proxy.registerRenderThings();
  444. }
  445.  
  446. public static CreativeTabs tabYoshiCraft = new CreativeTabs("tabYoshiCraft"){
  447. @Override
  448. public Item getTabIconItem(){
  449. return new ItemStack(blockYoshi).getItem();
  450. }
  451. };
  452.  
  453. YCWorldGen eventWorldGen = new YCWorldGen();
  454.  
  455. }
Advertisement
Add Comment
Please, Sign In to add comment