Jump to content

Scrapnix

Members
  • Posts

    7
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Germany
  • Personal Text
    Forge modder and lover of mods!

Scrapnix's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Ouu yes, I didn`t think about this reason. Thank you, it works
  2. Hey, I want to make a recipe with modded items. My basic recipe is: public static void addRecipes(){ ItemStack lavablock = new ItemStack(Main.lavablock); ItemStack lavaingot = new ItemStack(Main.lavaingot); GameRegistry.addRecipe(lavablock, "lll", "lll", "lll", 'l', lavaingot); } I registered the method in my main class and recipies without my modded items are working. The Class of the lavablock is: public class LavaBlock extends Block{ private final String name = "lavablock"; public LavaBlock(){ super(Material.rock); setUnlocalizedName(Main.MODID + "_" + name); setCreativeTab(Main.CreativeTab1); GameRegistry.registerBlock(this, name); } public String getName(){ return name; } } The class of the lavaingot is the same one, but only for items. In my Main class are the items / blocks registered like so: public static Block lavablock; public static Item lavaingot; @EventHandler public void preInit(FMLPreInitializationEvent e) { ModRecipes.addRecipes(); } @EventHandler public void init(FMLInitializationEvent e) { lavablock = new LavaBlock(); lavaingot = new LavaIngot(); if(e.getSide() == Side.CLIENT) { //... ItemModelMesher register I hope for help Battlemac
  3. Hey, at first, thanks to you for your post, but I made all like you said and nothing changed I don`t know whats wrong in it. Every tutorial explains other whises to register Models... Do you know where I can learn mod coding on the right way? I`ll give my mod a second try and after that we will see... PS: You`re German? If you want to you can add me in Skype or give me your Skype name, because I`m searching for good coders which can help me. Skype: @battlemac182
  4. Hey, I`m a newbie at Forge modding and I wanted to make my first mod with an first item. It`s registered and it is displayed all the time with the right name, but ingame it has only the black-pink texture. The problem is the item rendering: The json file for my first item is located at assets.scraputils.models.item.lavaingot.json and the content is: { "parent": "builtin/generated", "textures": { "layer0": "scraputil:items/lavaingot" }, "display": { "thirdperson": { "rotation": [ -90, 0, 0 ], "translation": [ 0, 1, -3 ], "scale": [ 0.55, 0.55, 0.55 ] }, "firstperson": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] } } } The texture layer0 is located at assets.scraputils.textures.item.lavaingot.png My ItemRenderRegisterer looks like this: package com.Scrap.scraputils.client.render.items; import com.Scrap.scraputils.Main; import com.Scrap.scraputils.item.ModItems; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; public final class ItemRenderRegister { public static String modid = Main.MODID; public static void registerItemRenderer() { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(ModItems.LavaIngot, 0, new ModelResourceLocation("scraputils:lavaingot", "inventory")); reg(ModItems.LavaIngot); } public static void reg(Item item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(modid + ":" + item.getUnlocalizedName().substring(5), "inventory")); } } Please help me, Scrapnix
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.