Jump to content

Could't Render Item or texture (1.9.4)


.jason

Recommended Posts

Here's the ModItems Class

 

 

 

package _NapalmDeath_.tutorial.init;

 

import _NapalmDeath_.tutorial.Reference;

import _NapalmDeath_.tutorial.items.ItemBeverage;

import net.minecraft.client.Minecraft;

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

import net.minecraft.item.Item;

import net.minecraftforge.fml.common.registry.GameRegistry;

 

public class ModItems {

 

public static Item beverage;

 

 

public static void init() {

beverage = new ItemBeverage();

}

 

public static void register() {

GameRegistry.register(beverage);

}

 

public static void registerRenders() {

registerRender(beverage);

}

 

private static void registerRender(Item item){

System.out.println(item.getRegistryName());

Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));

}

}

 

 

 

.json file

 

 

 

{

    "parent": "builtin/generated",

    "textures": {

        "layer0":"firstmod:item/beverage.png"

    },

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

        }

    }         

}

 

 

 

Item class

 

 

 

package _NapalmDeath_.tutorial.items;

 

import _NapalmDeath_.tutorial.Reference;

 

import net.minecraft.item.Item;

 

public class ItemBeverage extends Item {

 

public ItemBeverage() {

setUnlocalizedName(Reference.TutorialItems.BEVERAGE.getUnlocalizedName());

setRegistryName(Reference.TutorialItems.BEVERAGE.getRegistryName());

}

}

 

 

 

 

And the error message I get

 

 

 

-- System Details --

Details:

Minecraft Version: 1.9.4

Operating System: Windows 10 (amd64) version 10.0

Java Version: 1.8.0_101, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 790551240 bytes (753 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML:

Loaded coremods (and transformers):

GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 365.10' Renderer: 'GeForce GTX 960/PCIe/SSE2'

[19:35:41] [Client thread/INFO] [FML]: MinecraftForge v12.17.0.2051 Initialized

[19:35:41] [Client thread/INFO] [FML]: Replaced 232 ore recipes

[19:35:42] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer

[19:35:42] [Client thread/INFO] [FML]: Searching C:\Users\Brandon\Desktop\Modding\run\mods for mods

[19:35:43] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load

[19:35:43] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, firstmod] at CLIENT

[19:35:43] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, firstmod] at SERVER

[19:35:43] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Testing Mod

[19:35:43] [Client thread/INFO] [FML]: Processing ObjectHolder annotations

[19:35:44] [Client thread/INFO] [FML]: Found 418 ObjectHolder annotations

[19:35:44] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations

[19:35:44] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations

[19:35:44] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0

[19:35:44] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json

[19:35:44] [Client thread/INFO] [sTDOUT]: [_NapalmDeath_.tutorial.Tutorial:preInit:25]: Pre Init

[19:35:44] [Client thread/INFO] [FML]: Applying holder lookups

[19:35:44] [Client thread/INFO] [FML]: Holder lookups applied

[19:35:44] [Client thread/INFO] [FML]: Injecting itemstacks

[19:35:44] [Client thread/INFO] [FML]: Itemstack injection complete

[19:35:44] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Found status: AHEAD Target: null

[19:35:46] [sound Library Loader/INFO]: Starting up SoundSystem...

[19:35:46] [Thread-8/INFO]: Initializing LWJGL OpenAL

[19:35:46] [Thread-8/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

[19:35:46] [Thread-8/INFO]: OpenAL initialized.

[19:35:47] [sound Library Loader/INFO]: Sound engine started

[19:35:50] [Client thread/INFO] [FML]: Max texture size: 16384

[19:35:50] [Client thread/INFO]: Created: 16x16 textures-atlas

[19:35:50] [Client thread/ERROR] [FML]: Exception loading model for variant firstmod:ItemBeverage#inventory for item "firstmod:ItemBeverage", normal location exception:

net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model firstmod:item/ItemBeverage 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:170) ~[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.registerReloadListener(SimpleReloadableResourceManager.java:121) [simpleReloadableResourceManager.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:538) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:384) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

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

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]

at GradleStart.main(GradleStart.java:26) [start/:?]

Caused by: java.io.FileNotFoundException: firstmod:models/item/ItemBeverage.json

at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:69) ~[simpleReloadableResourceManager.class:?]

at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:311) ~[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:849) ~[ModelLoader$VanillaLoader.class:?]

at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:130) ~[ModelLoaderRegistry.class:?]

... 20 more

[19:35:50] [Client thread/ERROR] [FML]: Exception loading model for variant firstmod:ItemBeverage#inventory for item "firstmod:ItemBeverage", blockstate location exception:

net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model firstmod:ItemBeverage#inventory 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:170) ~[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.registerReloadListener(SimpleReloadableResourceManager.java:121) [simpleReloadableResourceManager.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:538) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:384) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

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

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

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:78) ~[ModelBlockDefinition.class:?]

at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1165) ~[ModelLoader$VariantLoader.class:?]

at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:130) ~[ModelLoaderRegistry.class:?]

... 20 more

[19:35:51] [Client thread/INFO] [sTDOUT]: [_NapalmDeath_.tutorial.Tutorial:init:34]: Init

[19:35:51] [Client thread/INFO] [sTDOUT]: [_NapalmDeath_.tutorial.init.ModItems:registerRender:28]: firstmod:ItemBeverage

[19:35:51] [Client thread/INFO] [FML]: Injecting itemstacks

[19:35:51] [Client thread/INFO] [FML]: Itemstack injection complete

[19:35:51] [Client thread/INFO] [sTDOUT]: [_NapalmDeath_.tutorial.Tutorial:postInit:41]: Post Init

[19:35:51] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods

[19:35:51] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Testing Mod

[19:35:53] [Client thread/INFO]: SoundSystem shutting down...

[19:35:53] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com

[19:35:53] [sound Library Loader/INFO]: Starting up SoundSystem...

[19:35:53] [Thread-10/INFO]: Initializing LWJGL OpenAL

[19:35:53] [Thread-10/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

[19:35:53] [Thread-10/INFO]: OpenAL initialized.

[19:35:54] [sound Library Loader/INFO]: Sound engine started

[19:35:56] [Client thread/INFO] [FML]: Max texture size: 16384

[19:35:56] [Client thread/INFO]: Created: 1024x512 textures-atlas

[19:35:57] [Client thread/ERROR] [FML]: Exception loading model for variant firstmod:ItemBeverage#inventory for item "firstmod:ItemBeverage", normal location exception:

net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model firstmod:item/ItemBeverage 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:170) ~[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:131) [simpleReloadableResourceManager.class:?]

at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:112) [simpleReloadableResourceManager.class:?]

at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:797) [Minecraft.class:?]

at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:332) [FMLClientHandler.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:559) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:384) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

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

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]

at GradleStart.main(GradleStart.java:26) [start/:?]

Caused by: java.io.FileNotFoundException: firstmod:models/item/ItemBeverage.json

at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:69) ~[simpleReloadableResourceManager.class:?]

at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:311) ~[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:849) ~[ModelLoader$VanillaLoader.class:?]

at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:130) ~[ModelLoaderRegistry.class:?]

... 23 more

[19:35:57] [Client thread/ERROR] [FML]: Exception loading model for variant firstmod:ItemBeverage#inventory for item "firstmod:ItemBeverage", blockstate location exception:

net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model firstmod:ItemBeverage#inventory 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:170) ~[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:131) [simpleReloadableResourceManager.class:?]

at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:112) [simpleReloadableResourceManager.class:?]

at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:797) [Minecraft.class:?]

at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:332) [FMLClientHandler.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:559) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:384) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

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

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

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:78) ~[ModelBlockDefinition.class:?]

at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1165) ~[ModelLoader$VariantLoader.class:?]

at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:130) ~[ModelLoaderRegistry.class:?]

... 23 more

[19:35:58] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id

 

 

 

Link to comment
Share on other sites

Instead of modelMesher use ModelLoader.setCustomModelResourceLocation(...) in your preInit method.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

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