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.

Featured Replies

Posted

Now it's giving me this error, and it won't load the texture.

 

Error

[16:12:10] [Client thread/ERROR] [FML]: Exception loading model for variant testmod:testmod:test_item#normal for item "testmod:test_item", normal location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model testmod:item/testmod:test_item with loader VanillaLoader.INSTANCE, skipping
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:134) ~[ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:298) ~[ModelLoader.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:169) ~[ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:128) ~[ModelLoader.class:?]
at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:130) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:111) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:792) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:332) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:554) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:381) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.io.FileNotFoundException: testmod:models/item/testmod:test_item.json
at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:68) ~[FallbackResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:64) ~[simpleReloadableResourceManager.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:310) ~[ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.access$1100(ModelLoader.java:99) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:844) ~[ModelLoader$VanillaLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:130) ~[ModelLoaderRegistry.class:?]
... 23 more
[16:12:10] [Client thread/ERROR] [FML]: Exception loading model for variant testmod:testmod:test_item#normal for item "testmod:test_item", blockstate location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model testmod:testmod:test_item#normal with loader VariantLoader.INSTANCE, skipping
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:134) ~[ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:306) ~[ModelLoader.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:169) ~[ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:128) ~[ModelLoader.class:?]
at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:130) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:111) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:792) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:332) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:554) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:381) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:75) ~[ModelBlockDefinition.class:?]
at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1159) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:130) ~[ModelLoaderRegistry.class:?]
... 23 more

 

InitItems.java

package com.fire.testmod.Init;

import com.fire.testmod.Strings;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class InitItems {
public static Item test_item;

public static void init(){
	test_item = new Item().setRegistryName(Strings.MODID, "test_item");
	register();
}

public static void register(){
	GameRegistry.register(test_item);
}

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

public static void registerRender(Item item){
	ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(Strings.MODID + ":" + item.getRegistryName()));
}
}

 

ClientProxy.java

package com.fire.testmod.Proxies;

import com.fire.testmod.Strings;
import com.fire.testmod.Init.InitItems;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;

public class ClientProxy extends CommonProxy {
public void registerRenderInfo(){
	InitItems.registerRenders();
}
}

 

MainRegistry.java

package com.fire.testmod;

import org.apache.logging.log4j.Logger;

import com.fire.testmod.Init.InitItems;
import com.fire.testmod.Proxies.ClientProxy;
import com.fire.testmod.Proxies.CommonProxy;

import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

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

@SidedProxy(clientSide = Strings.CLIENTPROXY, serverSide = Strings.COMMONPROXY)
public static CommonProxy proxy;

@Instance(Strings.MODID)
public static MainRegistry instance;

public static Logger logger;

// Test Item

@EventHandler
public void PreLoad(FMLPreInitializationEvent event){
	logger = event.getModLog();
	InitItems.init();
	proxy.registerRenderInfo();
}

@EventHandler
public void Load(FMLInitializationEvent event){
}

@EventHandler
public void PostLoad(FMLPostInitializationEvent event){

}

}

 

assets/testmod/models/item/test_item.json

{
    "parent": "builtin/generated",
    "textures": {
        "layer0": "testmod: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 ]
        }
    }
}

I am on my journey of making a remake of matmos, as explained here.

proxy.registerRenderInfo();
InitItems.init();

 

You register the render before you've registered the item, so test_item is null. Use ModelLoader.setCustomModelResourceLocation() instead of that thing in registerRender() and get rid of cproxy too, Forge will route calls to the appropriate proxy.

 

You also need to set the registry name for our item or use the version of register that take a ResourceLocation.

Also, the model registration must happen in your client proxy, you cannot reference client-only classes from common code.

 

Along with that, don't use

item.getUnlocalizedName().substring(5)

, use

getRegistryName

.

 

Then go punch whoever told you to use getUnlocalizedName.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

I've updated my post with the codes to have the new codes, and the new error. I am seriously new to 1.9 so please go easy on me; what's wrong here?

I am on my journey of making a remake of matmos, as explained here.

  • Author

Hmm, okay. That worked, but it still won't load the texture :(

 

New Error?

[16:20:13] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
[16:20:13] [Client thread/ERROR] [TEXTURE ERRORS]: The following texture errors were found.
[16:20:14] [Client thread/ERROR] [TEXTURE ERRORS]: ==================================================
[16:20:14] [Client thread/ERROR] [TEXTURE ERRORS]:   DOMAIN testmod
[16:20:14] [Client thread/ERROR] [TEXTURE ERRORS]: --------------------------------------------------
[16:20:14] [Client thread/ERROR] [TEXTURE ERRORS]:   domain testmod is missing 1 texture
[16:20:14] [Client thread/ERROR] [TEXTURE ERRORS]:     domain testmod has 2 locations:
[16:20:14] [Client thread/ERROR] [TEXTURE ERRORS]:       mod testmod resources at E:\Desktop\Minecraft Mod Making\[1.9] Modding Environment\bin
[16:20:14] [Client thread/ERROR] [TEXTURE ERRORS]:       mod tutorialmod resources at E:\Desktop\Minecraft Mod Making\[1.9] Modding Environment\bin
[16:20:14] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------
[16:20:14] [Client thread/ERROR] [TEXTURE ERRORS]:     The missing resources for domain testmod are:
[16:20:14] [Client thread/ERROR] [TEXTURE ERRORS]:       textures/items/test_item.png
[16:20:14] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------
[16:20:14] [Client thread/ERROR] [TEXTURE ERRORS]:     No other errors exist for domain testmod
[16:20:14] [Client thread/ERROR] [TEXTURE ERRORS]: ==================================================
[16:20:14] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

I am on my journey of making a remake of matmos, as explained here.

  • Author

By the way, I keep getting this error every once in a while every time I try to launch...

 

'Launching Client' has encountered a problem.

Variable references empty selection: ${project_loc}

 

Any ideas?

 

Edit: Nevermind, solved, this whole topic. Thank you all for the help!

I am on my journey of making a remake of matmos, as explained here.

Guest
This topic is now closed to further replies.

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.