Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

unlink

Members
  • Joined

  • Last visited

  1. Well, all I know is that it's working now which makes me more than happy.
  2. Thanks so much! That fixed it. I actually never considered it was my IDE's fault
  3. Hello, I recently started modding Minecraft and I've come to the point where I was trying to add textures to a test item and a test block that I created. It just doesn't seem to be working. I've spent about 6 hours trying to figure out why it won't load the texture. Here's what I'm getting from the debug logs: [19:04:00] [Client thread/ERROR] [FML]: Model definition for location mkcm:test_block#inventory not found [19:04:00] [Client thread/ERROR] [FML]: Model definition for location mkcm:test_block#normal not found [19:04:00] [Client thread/ERROR] [FML]: Model definition for location mkcm:test_item#inventory not found Here's my TestItem class package me.krickl.TestMod.items; import me.krickl.TestMod.Reference; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraftforge.fml.common.registry.GameRegistry; /** * Created by unlink on 3/5/15. */ public class TestItem extends Item { private final String name = "test_item"; public TestItem() { GameRegistry.registerItem(this, name); setUnlocalizedName(Reference.MODID + "_" + name); setCreativeTab(CreativeTabs.tabMisc); } public String getName() { return name; } } and my Mod class package me.krickl.TestMod; import me.krickl.TestMod.blocks.TestBlock; import me.krickl.TestMod.items.TestItem; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; 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.relauncher.Side; @Mod(modid = Reference.MODID, name = Reference.MODNAME, version = Reference.VERSION) public class TestMod { //items public static Item testItem; //blocks public static Block testBlock; @EventHandler public void preInit(FMLPreInitializationEvent event) { //init items and blocks testItem = new TestItem(); testBlock = new TestBlock(); } @EventHandler public void init(FMLInitializationEvent event) { // only run on client side! This code will raise an exception if run on server side if( event.getSide() == Side.CLIENT ) { RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); //blocks renderItem.getItemModelMesher().register(Item.getItemFromBlock(testBlock), 0, new ModelResourceLocation((Reference.MODID + ":" + ((TestBlock)testBlock).getName()), "inventory")); System.out.println(Reference.MODID + ":" + ((TestBlock) testBlock).getName()); //items renderItem.getItemModelMesher().register(testItem, 0, new ModelResourceLocation(Reference.MODID + ":" + ((TestItem) testItem).getName(), "inventory")); } } } my Reference class package me.krickl.TestMod; /** * Created by unlink on 3/5/15. */ public class Reference { public static final String MODID = "mkcm"; public static final String MODNAME = "TestMod"; public static final String VERSION = "1.0"; } My test_item.json { "parent": "builtin/generated", "textures": { "layer0": "mkcm:items/test_item" }, "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 ] } } } and lastly my file structure [/img] I just can't figure out why I can't load textures. I hope you can help me. Thanks in advance

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.