Jump to content

[1.8.9]Minecraft doesn't load texture, lang file and mcmod.info


NpGamingBoy

Recommended Posts

Hi I'm new to minecraft modding and java. I've been searching for tutorials for modding and java. But I've been stuck on this error Model definition for location tm:item#inventory not found. I believe I've put the json and texture in the  correct place.Here is my log file.latest.log  Is minecraft recognizing my item as a block and giving FileNotFound error. And also neither the lang nor the mcmod.info file are being registered even tough they are in the correct place. Here is my main mod file:-

 

package com.NGB;

import com.NGB.init.ModItems;
import com.NGB.proxy.CommonProxy;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class testmod {

    @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS)
    public static CommonProxy proxy;

    @Mod.EventHandler
    public static void preInit(FMLPreInitializationEvent event){
        ModItems.init();
        ModItems.register();
    }

    @Mod.EventHandler
    public static void init(FMLInitializationEvent event){
        System.out.println("The test mod has been loaded.");
        proxy.registerRenders();
    }

    @Mod.EventHandler
    public static void postInit(FMLPostInitializationEvent event){

    }

}

Here is my ClientProxy :-

package com.NGB.proxy;

import com.NGB.init.ModItems;

public class ClientProxy extends CommonProxy {
    @Override
    public void registerRenders(){
        ModItems.registerRenders();
    }
}

Here is my CommonProxy :-

package com.NGB.proxy;

public class CommonProxy {

    public void registerRenders(){

    }

}

Here is my ModItems file :-

package com.NGB.init;

import com.NGB.Reference;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class ModItems {

    public static Item bedrock_sword;

    public static void init() {
        bedrock_sword = new Item().setUnlocalizedName("bedrock_sword");
    }

    public static void register() {
        registerItem(bedrock_sword);
    }

    public static void registerRenders(){
        registerRender(bedrock_sword);
    }

    public static void registerItem(Item item) {
        GameRegistry.registerItem(item, item.getUnlocalizedName().substring(5));
        System.out.println("Registered item :- " + item.getUnlocalizedName().substring(5));
    }

    public static void registerRender(Item item){
        Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "Inventory"));
    }

}

Here is my json :-

{
  "parent": "builtin/generated",
  "textures": {
    "layer0": "tm:items/bedrock_sword"
  },
  "display": {
    "thirdperson": {
      "rotation": [ 0, 90, -35 ],
      "translation": [ 0, 1.25, -3.5 ],
      "scale": [ 0.85, 0.85, 0.85 ]
    },
    "firstperson": {
      "rotation": [ 0, -135, 25 ],
      "translation": [ 0, 4, 2 ],
      "scale": [ 1.7, 1.7, 1.7 ]
    }
  }
}

 

Link to comment
Share on other sites

  • NpGamingBoy changed the title to [1.8.9]Minecraft doesn't load texture, lang file and mcmod.info
Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

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