Jump to content

Why are item textures not displaying?


an_awsome_person

Recommended Posts

My mod has one non-vanilla item. When I run it, the item displays the "no texture" texture but otherwise behaves like it's supposed to. My texture file is  resources\assets\renewabilitymod\textures\item\chain_mail.png. This is my code.

java\com\renewability\renewabilitymod\RenewabilityMod.java

Spoiler

package com.renewability.renewabilitymod;

import client.ItemsModelsHandler;
import items.ItemChainMail;
import main.ModItems;
import main.ModRecipes;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderItem;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.relauncher.Side;

@Mod(modid = RenewabilityMod.MODID, version = RenewabilityMod.VERSION)
public class RenewabilityMod
{
    public static final String MODID = "renewabilitymod";
    public static final String VERSION = "1.10";
    
    
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
        ModItems.items();
        ModRecipes.recipes();
        
        if(event.getSide() == Side.CLIENT){
            RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
            renderItem.getItemModelMesher().register(ModItems.chain_mail, 0, 
            new ModelResourceLocation(RenewabilityMod.MODID + ":" + ((ItemChainMail) 
            ModItems.chain_mail).getName(), "inventory"));
            
            ItemsModelsHandler.preInit();
        }
    }
}

java\main\ModItems.java

Spoiler

package main;

import items.ItemChainMail;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class ModItems {
    
    public static final Item chain_mail = new ItemChainMail();
       
    @EventHandler
    public static void items(){
        GameRegistry.register(chain_mail.setRegistryName("chain_mail"));
        ModelResourceLocation chainMailLocation = new ModelResourceLocation
        (chain_mail.getRegistryName(), "inventory");
        ModelLoader.setCustomModelResourceLocation(chain_mail, 0, chainMailLocation);
    }
}

java\client\ItemsModelsHandler.java

Spoiler

package client;

import main.ModItems;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class ItemsModelsHandler {
    
    public static void  preInit(){
        loadModel(ModItems.chain_mail);
    }
    
    private static void loadModel(Item item) {
        ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation
        (item.getRegistryName(), "inventory"));
    }
}

java\items\ItemChainMail.java

Spoiler

package items;

import com.renewability.renewabilitymod.RenewabilityMod;

import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;

public class ItemChainMail extends Item{
    
    private final String name = "chain_mail";
    
    
    public ItemChainMail(){
        //GameRegistry.registerItem(this, "chain_mail");
        setUnlocalizedName(RenewabilityMod.MODID + "_" + name);
        setCreativeTab(CreativeTabs.MATERIALS);
        
    }
    
    public String getName(){
        return(name);
    }
}

resources\assets\renewabilitymod\models\item\chain_mail.json

Spoiler

{
   "parent": "item/generated",
   "textures": {
      "layer0": "renewabilitymod:items/chain_mail"
   }
}

What am I doing wrong?

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Link to comment
Share on other sites

Show the game's output log.

The game prints all texture loading problems there.

 

Also:

Don't use event.getSide() == Side.CLIENT, use a ClientProxy class.

 

Also also:

Quote

RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();

The fuk? Use ModelLoader.setCustomModelResourceLocation(...)

 

Also also also:

Quote

new ModelResourceLocation(RenewabilityMod.MODID + ":" + ((ItemChainMail)ModItems.chain_mail) .getName()

Jesus H Christ on a crutch. What nonsense is this?

ModItems.chain_mail.getRegistryName()

 

 

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.

Link to comment
Share on other sites

23 hours ago, Draco18s said:

 

Also also:

The fuk? Use ModelLoader.setCustomModelResourceLocation(...)

 

Also also also:

Jesus H Christ on a crutch. What nonsense is this?

ModItems.chain_mail.getRegistryName()

 

 

This is what my RenewabilityMod class looks like right now.

Spoiler

package com.renewability.renewabilitymod;

import client.ItemsModelsHandler;
import main.ModItems;
import main.ModRecipes;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.relauncher.Side;

@Mod(modid = RenewabilityMod.MODID, version = RenewabilityMod.VERSION)
public class RenewabilityMod
{
    public static final String MODID = "renewabilitymod";
    public static final String VERSION = "1.10";
    
    
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
        ModItems.items();
        ModRecipes.recipes();
        
        if(event.getSide() == Side.CLIENT){
            ModelLoader.setCustomModelResourceLocation(ModItems.chain_mail, 0, 
            new ModelResourceLocation(ModItems.chain_mail.getRegistryName(), "inventory"));
            Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(ModItems.
            chain_mail, 0, new ModelResourceLocation(ModItems.chain_mail.getRegistryName(), 
            "inventory"));
            
            ItemsModelsHandler.preInit();
        }
    }
}
 

23 hours ago, Draco18s said:

Show the game's output log.

The game prints all texture loading problems there.

 

Here you go. (this is after the changes to RenewabilityMod)

Spoiler

2017-03-11 17:52:18,678 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2017-03-11 17:52:18,680 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[17:52:18] [main/INFO] [GradleStart]: Extra: []
[17:52:18] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/Work Hard/.gradle/caches/minecraft/assets, --assetIndex, 1.10, --accessToken{REDACTED}, --version, 1.10, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[17:52:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[17:52:18] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[17:52:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[17:52:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[17:52:18] [main/INFO] [FML]: Forge Mod Loader version 12.18.0.2000 for Minecraft 1.10 loading
[17:52:18] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_91, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_91
[17:52:18] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[17:52:19] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[17:52:19] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[17:52:19] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[17:52:19] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[17:52:19] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[17:52:19] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[17:52:19] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[17:52:19] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[17:52:19] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[17:52:19] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[17:52:21] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[17:52:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[17:52:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[17:52:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[17:52:22] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[17:52:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[17:52:22] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
2017-03-11 17:52:22,914 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2017-03-11 17:52:22,948 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2017-03-11 17:52:22,952 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[17:52:23] [Client thread/INFO]: Setting user: Player867
[17:52:28] [Client thread/WARN]: Skipping bad option: lastServer:
[17:52:28] [Client thread/INFO]: LWJGL Version: 2.9.4
[17:52:30] [Client thread/INFO] [STDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:221]: ---- Minecraft Crash Report ----
// I'm sorry, Dave.

Time: 3/11/17 5:52 PM
Description: Loading screen debug info

This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
    Minecraft Version: 1.10
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_91, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 733948248 bytes (699 MB) / 909639680 bytes (867 MB) up to 2837446656 bytes (2706 MB)
    JVM Flags: 0 total; 
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: 
    Loaded coremods (and transformers): 
    GL info: ' Vendor: 'Intel' Version: '4.3.0 - Build 20.19.15.4501' Renderer: 'Intel(R) HD Graphics 4400'
[17:52:30] [Client thread/INFO] [FML]: MinecraftForge v12.18.0.2000 Initialized
[17:52:30] [Client thread/INFO] [FML]: Replaced 233 ore recipes
[17:52:30] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[17:52:30] [Client thread/INFO] [FML]: Searching D:\forge\run\mods for mods
[17:52:30] [Client thread/INFO] [renewabilitymod]: Mod renewabilitymod is missing the required element 'name'. Substituting renewabilitymod
[17:52:33] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[17:52:33] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, renewabilitymod] at CLIENT
[17:52:33] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, renewabilitymod] at SERVER
[17:52:34] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:renewabilitymod
[17:52:34] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
[17:52:34] [Client thread/INFO] [FML]: Found 423 ObjectHolder annotations
[17:52:34] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
[17:52:34] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
[17:52:34] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[17:52:34] [Client thread/INFO] [FML]: Applying holder lookups
[17:52:34] [Client thread/INFO] [FML]: Holder lookups applied
[17:52:34] [Client thread/INFO] [FML]: Injecting itemstacks
[17:52:34] [Client thread/INFO] [FML]: Itemstack injection complete
[17:52:34] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[17:52:35] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Found status: BETA Target: null
[17:52:41] [Sound Library Loader/INFO]: Starting up SoundSystem...
[17:52:41] [Thread-8/INFO]: Initializing LWJGL OpenAL
[17:52:41] [Thread-8/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[17:52:42] [Thread-8/INFO]: OpenAL initialized.
[17:52:42] [Sound Library Loader/INFO]: Sound engine started
[17:52:47] [Client thread/INFO] [FML]: Max texture size: 8192
[17:52:47] [Client thread/INFO]: Created: 16x16 textures-atlas
[17:52:49] [Client thread/INFO] [FML]: Injecting itemstacks
[17:52:49] [Client thread/INFO] [FML]: Itemstack injection complete
[17:52:49] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
[17:52:49] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:renewabilitymod
[17:52:55] [Client thread/INFO]: SoundSystem shutting down...
[17:52:55] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
[17:52:55] [Sound Library Loader/INFO]: Starting up SoundSystem...
[17:52:55] [Thread-10/INFO]: Initializing LWJGL OpenAL
[17:52:55] [Thread-10/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[17:52:56] [Thread-10/INFO]: OpenAL initialized.
[17:52:56] [Sound Library Loader/INFO]: Sound engine started
[17:52:59] [Client thread/INFO] [FML]: Max texture size: 8192
[17:52:59] [Client thread/INFO]: Created: 1024x512 textures-atlas
[17:53:00] [Client thread/ERROR] [FML]: Exception loading model for variant renewabilitymod:chain_mail#inventory for item "renewabilitymod:chain_mail", normal location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model renewabilitymod:item/chain_mail with loader VanillaLoader.INSTANCE, skipping
    at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
    at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:317) ~[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:147) ~[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:132) [SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:799) [Minecraft.class:?]
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:338) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:386) [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: renewabilitymod:models/item/chain_mail.json
    at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:68) ~[FallbackResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:65) ~[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:118) ~[ModelLoader.class:?]
    at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:868) ~[ModelLoader$VanillaLoader.class:?]
    at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
    ... 23 more
[17:53:00] [Client thread/ERROR] [FML]: Exception loading model for variant renewabilitymod:chain_mail#inventory for item "renewabilitymod:chain_mail", blockstate location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model renewabilitymod:chain_mail#inventory with loader VariantLoader.INSTANCE, skipping
    at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
    at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:325) ~[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:147) ~[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:132) [SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:799) [Minecraft.class:?]
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:338) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:386) [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:78) ~[ModelBlockDefinition.class:?]
    at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1183) ~[ModelLoader$VariantLoader.class:?]
    at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
    ... 23 more
[17:53:00] [Client thread/WARN]: Skipping bad option: lastServer:
[17:53:02] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id
[17:53:37] [Client thread/INFO]: Stopping!
[17:53:37] [Client thread/INFO]: SoundSystem shutting down...
[17:53:37] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
 

23 hours ago, Draco18s said:

 

Also:

Don't use event.getSide() == Side.CLIENT, use a ClientProxy class.

 

Can you be more specific? I know almost nothing about Java.

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Link to comment
Share on other sites

Proxies are not a Java thing.

http://mcforge.readthedocs.io/en/latest/concepts/sides/

19 minutes ago, an_awsome_person said:

Exception loading model for variant renewabilitymod:chain_mail#inventory for item "renewabilitymod:chain_mail", blockstate location exception

19 minutes ago, an_awsome_person said:

Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException

18 minutes ago, an_awsome_person said:

Caused by: java.io.FileNotFoundException: renewabilitymod:models/item/chain_mail.json

 

Your model can't be loaded because either:
Your blockstate file lacks an inventory variant or because there is no item model json

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.

Link to comment
Share on other sites

On 3/11/2017 at 6:15 PM, Draco18s said:

Can you teach me how to use proxies? 

On 3/11/2017 at 6:15 PM, Draco18s said:


Your blockstate file lacks an inventory variant 

How do I fix this?

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Link to comment
Share on other sites

2 hours ago, an_awsome_person said:

Can you teach me how to use proxies? 

http://mcforge.readthedocs.io/en/latest/concepts/sides/

Quote

How do I fix this?

...Add an variant named "inventory"?

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.

Link to comment
Share on other sites

On 11/03/2017 at 1:43 AM, an_awsome_person said:

package items;

import com.renewability.renewabilitymod.RenewabilityMod;

import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;

public class ItemChainMail extends Item{
    
    private final String name = "chain_mail";
    
    
    public ItemChainMail(){
        //GameRegistry.registerItem(this, "chain_mail");
        setUnlocalizedName(RenewabilityMod.MODID + "_" + name);
        setCreativeTab(CreativeTabs.MATERIALS);
        
    }
    
    public String getName(){
        return(name);
    }
}

resources\assets\renewabilitymod\models\item\chain_mail.json

Quote

Caused by: java.io.FileNotFoundException: renewabilitymod:models/item/chain_mail.json

You said that's the path of your model, but the output log suggests that it can't find a file at that location. Are you certain that's the exact path with no typos? Maybe post a screenshot of your file structure to check.

Link to comment
Share on other sites

On 3/13/2017 at 0:56 AM, Jay Avery said:

You said that's the path of your model, but the output log suggests that it can't find a file at that location. Are you certain that's the exact path with no typos? Maybe post a screenshot of your file structure to check.

jsonPath.png.2b022f1cc6053748f27843228b3f6054.png

Here you go. 

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Link to comment
Share on other sites

Quote

            ModelLoader.setCustomModelResourceLocation(ModItems.chain_mail, 0, 
            new ModelResourceLocation(ModItems.chain_mail.getRegistryName(), "inventory"));
            Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(ModItems.
            chain_mail, 0, new ModelResourceLocation(ModItems.chain_mail.getRegistryName(), 
            "inventory"));

 

Why are you using both the ModelLoader and the ModelMesher?

I told you to replace the one with the other.

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.

Link to comment
Share on other sites

On 3/19/2017 at 7:41 PM, Draco18s said:

Why are you using both the ModelLoader and the ModelMesher?

I told you to replace the one with the other.

Done. I didn't see any difference, though.

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Link to comment
Share on other sites

And what does your code look like now?

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.

Link to comment
Share on other sites

23 hours ago, Draco18s said:

And what does your code look like now?

Spoiler

package com.renewability.renewabilitymod;

import client.ItemsModelsHandler;
import main.ModItems;
import main.ModRecipes;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.relauncher.Side;

@Mod(modid = RenewabilityMod.MODID, version = RenewabilityMod.VERSION)
public class RenewabilityMod
{
    public static final String MODID = "renewabilitymod";
    public static final String VERSION = "1.10";
    
    
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
        ModItems.items();
        ModRecipes.recipes();
        
        if(event.getSide() == Side.CLIENT){
            ModelLoader.setCustomModelResourceLocation(ModItems.chain_mail, 0, 
            new ModelResourceLocation(ModItems.chain_mail.getRegistryName(), "inventory"));
            /*Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(ModItems.
            chain_mail, 0, new ModelResourceLocation(ModItems.chain_mail.getRegistryName(), 
            "inventory"));*/
            
            ItemsModelsHandler.preInit();
        }
    }
}
 

 

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Link to comment
Share on other sites

On 3/26/2017 at 3:30 PM, diesieben07 said:

ModelLoader must be used in preInit. It also needs to happen in your client proxy. What does your ItemsModelsHandler class do?

Not much, really. I copied it from someone else's mod.

Spoiler

package client;

import main.ModItems;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class ItemsModelsHandler {
    
    public static void  preInit(){
        loadModel(ModItems.chain_mail);
    }
    
    private static void loadModel(Item item) {
        ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation
        (item.getRegistryName(), "inventory"));
    }
}

Edited by an_awsome_person

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Link to comment
Share on other sites

On 3/11/2017 at 5:55 PM, an_awsome_person said:

I know almost nothing about Java

Uh-oh,  :o that's "lock my thread" bait. I'm surprised we're still talking here.

 

Would-be modders are responsible for acquiring Java ability (and programming skill in general) on their own. Community members will volunteer Forge knowledge, but it's up to you to then research what all of the programming jargon means...

 

On 4/4/2017 at 9:24 AM, an_awsome_person said:

What's preInit, again?

... Such as preinit. Start searching. To make better use of this forum, you need to raise your level of scholarship.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

On 4/7/2017 at 9:58 AM, Jay Avery said:

You need to put them in an EventHandler method with FMLPreInitializationEvent as a parameter, instead of one with FMLInitializationEvent as they are now.

I did that, and it didn't change anything.

On 4/7/2017 at 11:09 AM, jeffryfisher said:

 

Would-be modders are responsible for acquiring Java ability (and programming skill in general) on their own. Community members will volunteer Forge knowledge, but it's up to you to then research what all of the programming jargon means...

 

I know how to use conditionals, loops, methods, single-dimensional arrays, how to make classes, and how to use objects to store information. Is there a particular skill I need to learn to make modding easier?

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Link to comment
Share on other sites

Method signatures, objects, overriding, events are just the ones i can think of. 

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.

Link to comment
Share on other sites

21 hours ago, an_awsome_person said:

Is there a particular skill I need to learn to make modding easier?

Scholarship and Research: Search for definitions of unknown words and phrases. Run experiments.

Reverse-engineering and Debugging: Each means using your IDE to explore code, especially the vanilla code. Walking through idle code shows how it is connected, but even better is stepping through code as it runs so you can see data move through the system. Entering the debugger is like advancing from radio to color TV. Without the debugger, you are flying blind.

Edited by jeffryfisher

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

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.

Announcements



×
×
  • Create New...

Important Information

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