Jump to content

Item models don't render


shane020482

Recommended Posts

I know this is a older topic but Iv ran into a small prob. When using custom models the default model method doesent work and the item blocks dont render. If I put the model in each of the variants the blocks look fine but nothing I do makes the item render. I have used this method for other blocks that use the MC cube model and it works fine its just when I use a custom model.

 

Item error

 

[08:34:54] [Client thread/ERROR] [FML]: Exception loading model for variant deadlyworld:block_lamp#ison=true,type=black for blockstate "deadlyworld:block_lamp[ison=true,type=black]"

net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model deadlyworld:block_lamp#ison=true,type=black with loader VariantLoader.INSTANCE, skipping

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

at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:241) ~[ModelLoader.class:?]

at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:145) ~[ModelBakery.class:?]

at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?]

at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[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:340) [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_112]

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

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

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

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

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

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

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

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:1184) ~[ModelLoader$VariantLoader.class:?]

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

 

 

//blockstate

https://github.com/Shane2482/Deadly-World/blob/master/src/main/resources/assets/deadlyworld/blockstates/block_lamp.json

 

//model

https://github.com/Shane2482/Deadly-World/blob/master/src/main/resources/assets/deadlyworld/models/block/lamp.json

 

//texture map for model

https://github.com/Shane2482/Deadly-World/blob/master/src/main/resources/assets/deadlyworld/models/block/lamp_textures.json

Link to comment
Share on other sites

I know this is a older topic but Iv ran into a small prob. When using custom models the default model method doesent work and the item blocks dont render. If I put the model in each of the variants the blocks look fine but nothing I do makes the item render. I have used this method for other blocks that use the MC cube model and it works fine its just when I use a custom model.

 

Item error

 

[08:34:54] [Client thread/ERROR] [FML]: Exception loading model for variant deadlyworld:block_lamp#ison=true,type=black for blockstate "deadlyworld:block_lamp[ison=true,type=black]"

net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model deadlyworld:block_lamp#ison=true,type=black with loader VariantLoader.INSTANCE, skipping

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

at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:241) ~[ModelLoader.class:?]

at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:145) ~[ModelBakery.class:?]

at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?]

at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[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:340) [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_112]

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

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

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

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

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

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

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

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:1184) ~[ModelLoader$VariantLoader.class:?]

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

 

 

//blockstate

https://github.com/Shane2482/Deadly-World/blob/master/src/main/resources/assets/deadlyworld/blockstates/block_lamp.json

 

//model

https://github.com/Shane2482/Deadly-World/blob/master/src/main/resources/assets/deadlyworld/models/block/lamp.json

 

//texture map for model

https://github.com/Shane2482/Deadly-World/blob/master/src/main/resources/assets/deadlyworld/models/block/lamp_textures.json

 

Your block models weren't working without a model in each variant of the blockstates file due to these limitations of Forge's blockstates format.

 

The lamp_textures.json model does nothing and has no reason to exist, you should use the lamp.json model directly instead.

 

The error you posted is unrelated to item models. Make sure your blockstates file accounts for the limitations linked above, run Minecraft again and post the actual errors for the item models (or the full FML log).

 

Your post is mostly unrelated to the original topic, it probably should have been a new thread. Edit: And now it is.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

 

 

The lamp_textures.json model does nothing and has no reason to exist, you should use the lamp.json model directly instead.

 

The error you posted is unrelated to item models. Make sure your blockstates file accounts for the limitations linked above, run Minecraft again and post the actual errors for the item models (or the full FML log).

 

Your post is mostly unrelated to the original topic, it probably should have been a new thread. Edit: And now it is.

 

I have no clue how you found the need to use a dummy value, because that is such an unintuitive requirement.

I had the texture model there because I was using the MC cube method which uses cube_all for the textures, cube for the model, and block for the display. Its nice to know you can combine all of them into one file.

Still having probs with the item

Sry i grabed the wrong error

Heres the full log http://pastebin.com/sdz01d0g and a copy of my new blockstate http://pastebin.com/92M4ZMD3

 

 

Link to comment
Share on other sites

[10:28:33] [Client thread/ERROR] [FML]: Exception loading model for variant deadlyworld:block_lamp#type=white for item "deadlyworld:block_lamp", blockstate location exception:

net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model deadlyworld:block_lamp#type=white with loader VariantLoader.INSTANCE, skipping

...

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

 

There is no variant in your blockstates file called

type=white

, you need to use

ison=true,type=white

or

ison=false,type=white

instead.

 

The name and value of the dummy property don't matter, but you used the wrong explanation as your dummy values. All of your variants have at least one property (

textures

), it's the fact that this first property was an object that was causing this issue.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

 

There is no variant in your blockstates file called

type=white

, you need to use

ison=true,type=white

or

ison=false,type=white

instead.

 

The name and value of the dummy property don't matter, but you used the wrong explanation as your dummy values. All of your variants have at least one property (

textures

), it's the fact that this first property was an object that was causing this issue.

 

Yea I just grabed a dummy from your example for testing now that things are working Ill be cleaning up the code.

Thanks so Much this is a very unfriendly method to use however once you figure it out it makes things so much easier.

Have you thought about doing a tutorial on forge blockstates because for such a powerful method theirs almost no docs for it, and you seem to know quite a bit about it.

 

Finally heres a finished variant

 

"ison=true,type=black": {

      "dummy": "Dummy",

      "textures": {

        "2": "minecraft:blocks/glass_black"

      }

    },

    "ison=false,type=black": {

      "dummy": "Dummy",

      "textures": {

        "2": "deadlyworld:blocks/basalt_carved"

      }

    },

    "type=black": {

      "dummy": "Dummy",

      "textures": {

        "2": "minecraft:blocks/glass_black"

      }

    },

 

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • where opportunities abound and promises of financial prosperity beckon from every corner of the internet, the line between opportunity and deception becomes increasingly blurred. As a 38-year-old single mom, I embarked on a journey into the world of cryptocurrency investing, hoping to secure a brighter future for myself and my family. Little did I know, this journey would lead me down a treacherous path fraught with deception and heartbreak. My foray into cryptocurrency investing began with the promise of lucrative returns from a platform claiming to operate within Europe and South Asia. Blinded by optimism and the allure of financial gain, I entrusted my hard-earned savings to this fraudulent company, believing wholeheartedly in its legitimacy. However, my hopes were dashed when I began encountering difficulties with withdrawals and found myself entangled in a web of exorbitant fees and dubious practices. In a desperate bid to salvage what remained of my investment, I turned to a recovery company recommended to me by the very platform that had deceived me. Yet, even in my darkest hour, the deceit persisted, as I soon discovered that the company tasked with recovering my funds was complicit in the deception. Faced with the crushing realization that I had been betrayed once again, I felt a sense of hopelessness engulf me. It was in this moment of despair that I stumbled upon Lee Ultimate Hacker – a shining beacon of hope amidst the darkness of deception. Through a stroke of luck, I came across a blog post singing the praises of this remarkable team, and I knew I had found my savior. With nothing left to lose and everything to gain, I reached out to them, hoping against hope for a chance at redemption. From the outset, Lee Ultimate Hacker proved to be a guiding light in my journey toward financial recovery. Their professionalism, expertise, and unwavering commitment to client satisfaction set them apart from the myriad of recovery services in the digital sphere. With empathy and understanding, they listened to my story and embarked on a mission to reclaim what was rightfully mine. Through their diligent efforts and meticulous attention to detail, Lee Ultimate Hacker succeeded where others had failed, restoring a sense of hope and security in the wake of betrayal. Their dedication to justice and unwavering determination to deliver results ensured that I emerged from the ordeal stronger and more resilient than ever before. Throughout the recovery process, their team remained accessible, transparent, and supportive, offering guidance and reassurance every step of the way. To anyone grappling with devastating financial fraud, I offer a lifeline of hope – trust in Lee Ultimate Hacker to guide you through the storm with expertise and compassion. In a world rife with deception and uncertainty, they stand as a beacon of reliability and trustworthiness, ready to lead you toward financial restitution and a brighter future. If you find yourself in a similar predicament, do not hesitate to reach out to Lee Ultimate Hacker.AT LEEULTIMATEHACKER@ AOL. COM   Support @ leeultimatehacker . com.  telegram:LEEULTIMATE   wh@tsapp +1  (715) 314  -  9248  https://leeultimatehacker.com
    • Sorry, this is the report https://paste.ee/p/OeDj1
    • Please share a link to your crash report on https://paste.ee, as explained in the FAQ
    • This is the crash report [User dumped their crash report directly in their thread, triggering the anti-spam]  
    • Add the crash-report or latest.log (logs-folder) with sites like https://paste.ee/ and paste the link to it here  
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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