Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.8.9]Minecraft doesn't load texture, lang file and mcmod.info
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
NpGamingBoy

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

By NpGamingBoy, October 26, 2020 in Modder Support

  • Start new topic

Recommended Posts

NpGamingBoy    0

NpGamingBoy

NpGamingBoy    0

  • Tree Puncher
  • NpGamingBoy
  • Members
  • 0
  • 1 post
Posted October 26, 2020

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 ]
    }
  }
}

 

Share this post


Link to post
Share on other sites

diesieben07    7711

diesieben07

diesieben07    7711

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7711
  • 56563 posts
Posted October 26, 2020

1.8 is no longer supported on this forum.

Please update to a modern version of Minecraft to receive support.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • diesieben07
      When I generate a world it stays at 100%

      By diesieben07 · Posted 4 minutes ago

      Try without the "rats" mod please.
    • diesieben07
      [1.16] InputEvent.KeyInputEvent never fired

      By diesieben07 · Posted 10 minutes ago

      The correct event for this check is ClientTickEvent. Make sure to check TickEvent#phase.
    • diesieben07
      Question about itemstack capabilities of crafting results

      By diesieben07 · Posted 10 minutes ago

      Yeah, it would be better to just lazily initialize the values in the capability. However AttachCapabilitiesEvent is triggered directly from the ItemStack constructor. So it is impossible to have an ItemStack object and not have AttackCapabilitiesEvent fire for it.
    • Beethoven92
      [1.16] InputEvent.KeyInputEvent never fired

      By Beethoven92 · Posted 15 minutes ago

      They are basically the same. With the annotation method you can also specify the Dist where this event handler will be loaded on. What is wrong with your code is that your method is not declared as static. Take a look here for more info on events: https://mcforge.readthedocs.io/en/latest/events/intro/
    • DARKHAWX
      [1.16] InputEvent.KeyInputEvent never fired

      By DARKHAWX · Posted 28 minutes ago

      Hey there,   I'm trying to setup a basic keybinding, but I can't seem to get the event to fire. Here's my code for subscribing to the event:   @Mod.EventBusSubscriber public class ModKeyInputs { @SubscribeEvent public void onKeyInput(InputEvent.KeyInputEvent event) { if (ModKeyBindings.OPEN_DIVINE_FAVOUR_RELATIONSHIP.isPressed()) { Minecraft.getInstance().displayGuiScreen(new DivineFavourRelationshipsScreen(Minecraft.getInstance().player)); } } }   Now I've put a breakpoint in the method there at the start, and I can never get it to fire. Am I subscribing to this event incorrectly?   As a side note, is there much difference between using @Mod.EventBusSubscriber on a class versus MOD_EVENT_BUS.register(ModKeyInputs.class); in the constructor of the main mod class?
  • Topics

    • StormyRiley1
      5
      When I generate a world it stays at 100%

      By StormyRiley1
      Started 12 hours ago

    • DARKHAWX
      2
      [1.16] InputEvent.KeyInputEvent never fired

      By DARKHAWX
      Started 28 minutes ago

    • Tavi007
      3
      Question about itemstack capabilities of crafting results

      By Tavi007
      Started 1 hour ago

    • Fizedi
      0
      Loot table change for chest in plains house

      By Fizedi
      Started 1 hour ago

    • diseasedworm
      1
      A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException

      By diseasedworm
      Started 5 hours ago

  • Who's Online (See full list)

    • Mightydanp
    • Luis_ST
    • matezz
    • diesieben07
    • NindyBun
    • EnderiumSmith
    • Tavi007
    • StormyRiley1
    • troublemaker_47
    • samjviana
    • Beethoven92
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.8.9]Minecraft doesn't load texture, lang file and mcmod.info
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community