Advertisement
Guest User

src/main/java/de.kriegnes/KriegnesMod.java

a guest
May 2nd, 2015
268
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package de.kriegnes;
  2.  
  3. import de.kriegnes.blocks.BlockSchwarzerdiamantErz;
  4. import de.kriegnes.blocks.BlockSchwarzerdiamantblock;
  5. import de.kriegnes.items.ItemSchwarzerdiamant;
  6. import net.minecraft.block.Block;
  7. import net.minecraft.client.Minecraft;
  8. import net.minecraft.client.resources.model.ModelResourceLocation;
  9. import net.minecraft.init.Blocks;
  10. import net.minecraft.init.Items;
  11. import net.minecraft.item.Item;
  12. import net.minecraft.item.ItemStack;
  13. import net.minecraftforge.fml.common.Mod;
  14. import net.minecraftforge.fml.common.Mod.EventHandler;
  15. import net.minecraftforge.fml.common.event.FMLInitializationEvent;
  16. import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
  17. import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
  18. import net.minecraftforge.fml.common.registry.GameRegistry;
  19.  
  20. @Mod(modid = "kriegnesmod")
  21. public class KriegnesMod {
  22.  
  23. public static final String MODID = "kriegnesmod";
  24.  
  25. //Items
  26. public static Item schwarzerdiamant = new ItemSchwarzerdiamant();
  27.  
  28. //Blocks
  29. public static Block schwarzerdiamantErz = new BlockSchwarzerdiamantErz();
  30. public static Block schwarzerdiamantblock = new BlockSchwarzerdiamantblock();
  31.  
  32. @EventHandler
  33. public void preInit(FMLPreInitializationEvent event)
  34. {
  35.  
  36. }
  37. @EventHandler
  38. public void init(FMLInitializationEvent event)
  39. {
  40. //Items
  41. GameRegistry.registerItem(schwarzerdiamant, "schwarzerdiamant");
  42. Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(schwarzerdiamant, 0, new ModelResourceLocation("kriegnesmod:schwarzerdiamant", "inventory"));
  43.  
  44. //Blocks
  45. GameRegistry.registerBlock(schwarzerdiamantErz, "schwarzerdiamanterz");
  46. Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(schwarzerdiamantErz), 0, new ModelResourceLocation("kriegnesmod:schwarzerdiamanterz", "inventory"));
  47.  
  48. GameRegistry.registerBlock(schwarzerdiamantblock, "schwarzerdiamantblock");
  49. Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(schwarzerdiamantblock), 0, new ModelResourceLocation("kriegnesmod:schwarzerdiamantblock", "inventory"));
  50.  
  51. //Crafting-Blöcke
  52. ItemStack stackSchwarzerdiamant = new ItemStack(schwarzerdiamant);
  53. ItemStack stackSchwarzerdiamantblock = new ItemStack(schwarzerdiamantblock);
  54. GameRegistry.addShapedRecipe(stackSchwarzerdiamantblock, "sss", "sss", "sss", 'c', stackSchwarzerdiamant);
  55.  
  56. }
  57.  
  58. @EventHandler
  59. public void postInit(FMLPostInitializationEvent event)
  60. {
  61.  
  62. }
  63.  
  64. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement