Everything posted by asdfmovie99i
-
Problem with 1.8 selfmade Forgemod
I am pretty new to creating my own Mods using Forge. I tried a simple one, but it does not worked. It was supposed to melt a self created ore into a self created item. I had no problems with creating a recipe 1 diamond -> 8 coal for example. But it does not work with own blocks. The ore block i want to melt and the item works perfectly fine btw ( texture, getting effects by rightclicking item etc.) And sorry for my bad english package de.jens; import de.jens.blocks.BlockAmethystOre; import de.jens.items.ItemAmethyst; import de.jens.items.ItemAmethystAxe; import de.jens.items.ItemAmethystHoe; import de.jens.items.ItemAmethystPickaxe; import de.jens.items.ItemAmethystSpade; import de.jens.items.ItemAmethystSword; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemHoe; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemSpade; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; @Mod(modid = Firststeps.MODID) public class Firststeps { public static final String MODID = "firststeps"; //tools public static ToolMaterial amethystToolMaterial = EnumHelper.addToolMaterial("amethystToolMaterial", 3, 1000, 15.0F, 10, 10); // Items public static Item amethyst = new ItemAmethyst(); public static ItemSword amethystSword = new ItemAmethystSword(); public static ItemAxe amethystAxe = new ItemAmethystAxe(); public static ItemHoe amethystHoe = new ItemAmethystHoe(); public static ItemPickaxe amethystPickaxe = new ItemAmethystPickaxe(); public static ItemSpade amethystSpade = new ItemAmethystSpade(); //blocks public static Block amethystOre = new BlockAmethystOre(); @EventHandler public void preInit(FMLPreInitializationEvent event) { //shapeless crafting ItemStack stackWool = new ItemStack(Blocks.wool); ItemStack stackWeb5 = new ItemStack(Blocks.web, 5); GameRegistry.addShapelessRecipe(stackWeb5, stackWool); //crafting ItemStack stackStone = new ItemStack(Blocks.stone); ItemStack stackCobbleStone = new ItemStack(Blocks.cobblestone); ItemStack stackDispenser = new ItemStack(Blocks.dispenser); GameRegistry.addRecipe(stackDispenser, "ccc","c c","sss", 'c', stackCobbleStone, 's', stackStone); //smelting ItemStack stackDiamond = new ItemStack(Items.diamond); ItemStack stackCoalBlock8 = new ItemStack(Blocks.coal_block, ; ItemStack stackAmethystOre = new ItemStack(amethystOre); ItemStack stackAmethyst = new ItemStack(amethyst); GameRegistry.addSmelting(stackAmethystOre, stackAmethyst, 10000); GameRegistry.addSmelting(stackDiamond, stackCoalBlock8, 1000); } @EventHandler public void init(FMLInitializationEvent event) { //item registry GameRegistry.registerItem(amethyst, "amethyst"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(amethyst, 0, new ModelResourceLocation("firststeps:amethyst", "inventory")); GameRegistry.registerItem(amethystAxe, "amethystAxe"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(amethystAxe, 0, new ModelResourceLocation("firststeps:amethystAxe", "inventory")); GameRegistry.registerItem(amethystPickaxe, "amethystPickaxe"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(amethystPickaxe, 0, new ModelResourceLocation("firststeps:amethystPickaxe", "inventory")); GameRegistry.registerItem(amethystHoe, "amethystHoe"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(amethystHoe, 0, new ModelResourceLocation("firststeps:amethystHoe", "inventory")); GameRegistry.registerItem(amethystSpade, "amethystSpade"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(amethystSpade, 0, new ModelResourceLocation("firststeps:amethystSpade", "inventory")); GameRegistry.registerItem(amethystSword, "amethystSword"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(amethystSword, 0, new ModelResourceLocation("firststeps:amethystSword", "inventory")); //block registry GameRegistry.registerBlock(amethystOre, "amethyst_ore"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(amethystOre), 0, new ModelResourceLocation("firststeps:amethyst_ore","inventory")); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } }
IPS spam blocked by CleanTalk.