Jump to content

{Solved!!!} [1.10.2] Block Textures Not Loading


EscapeMC

Recommended Posts

Ok, so I have my blocks registered and everything now, but the textures do not appear.

 

GitHub: https://github.com/EcapeMC/TeamMadnessMod-1.10.2/tree/master/main

 

It is probably some stupid thing I cannot see...

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

Sooo.... #1: your registerRender method only registers a model for the Item form of your block.

#2: don't use the ModelMesher.  Use ModelLoader.setCustomModelResourceLocation.

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

Sooo.... #1: your registerRender method only registers a model for the Item form of your block.

#2: don't use the ModelMesher.  Use ModelLoader.setCustomModelResourceLocation.

 

#1, how can I change this? where exactly did I do this and how can I fix it?

 

#2, Goodness I suck at not using the right things! How can I change from ModelMesher? (where exactly did I do this? Are you saying to change

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

 

to

 

	    Minecraft.getMinecraft().getRenderItem().getModelLoader().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));

 

or what exactly for that?)

 

 

 

EDIT:

 

Ok, so are you looking for

 

	    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));

 

instead of that other thing that I had inside of registerRender(Block block)??

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

Oh for fuck's sake.

Use ModelLoader.setCustomModelResourceLocation.

 

How do you use this?  Like this:

ModelLoader.setCustomModelResourceLocation(item, metadata, modelResourceLocation)

 

Holy balls batman.  It's almost like I gave you the answer the first time.

 

As for #1, my mistake. I double checked my code and there shouldn't be anything you need to do for the in-world block renderer (I forget that it's handled automatically).  However, if there is a problem, you need to post the error that the game spits out (otherwise I don't know what to look for).

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

HOLY SHIT YES!!!!!! I actually figured out what you meant by the ModelLoader.setCustomModelResourceLocation!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

 

I am happy :D

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

HOLY SHIT YES!!!!!! I actually figured out what you meant by the ModelLoader.setCustomModelResourceLocation!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Ah, you edited it in while I was posting. Good job. :)

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

DRACO I OWE YOU SO FREAKING MUCH!!! FOR THE PAST MONTH I COULD NOT FIGURE OUT THIS PART AND I FINALLY DID SO THANKYOUTHANKYOUTHANKYOU BLESS YOU Draco18s

 

;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D :D :D :D :D :D :D :D :D :D :D :D

 

EDIT: Its only been like 2+/- weeks since you told me this but anyway, thank you!!!!!!!

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

Now do the same thing for your ModItems class.

(Also, you should definitely mark your registerRenders methods as SideOnly(Client) because the ModelLoader is a client side class.  You won't see a problem right now because the class itself isn't marked SideOnly(Client) for some reason, but it might be in the future).

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

Now do the same thing for your ModItems class.

(Also, you should definitely mark your registerRenders methods as SideOnly(Client) because the ModelLoader is a client side class.  You won't see a problem right now because the class itself isn't marked SideOnly(Client) for some reason, but it might be in the future).

 

Alright, so I am doing exactly this, but since it is not a block, what do i replace getItemFromBlock with, as they are items?

 

and, to make the registerRender methods SideOnly, where would I add SideOnly(Client)?

and I assume you want me to add SideOnly to both items and blocks?

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

You replace it with the Item :|

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

Wow... I am stupid.... *facepalm*

 

 

Also, where do I add @SideOnly(Client) exactly?

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

Also, after switching to ModelLoader.setCustomModelResourceLocation.... NONE of my textures have loaded, but now are only the black and purple "No texture" thing...

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

?

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

Also, after switching to ModelLoader.setCustomModelResourceLocation.... NONE of my textures have loaded, but now are only the black and purple "No texture" thing...

 

You need to call setCustomModelResourceLocation during preInit

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

Also, after switching to ModelLoader.setCustomModelResourceLocation.... NONE of my textures have loaded, but now are only the black and purple "No texture" thing...

 

You need to call setCustomModelResourceLocation during preInit

 

Alright! So, it all works, except my block textures. I called upon my ClientProxy.init (proxy.init();) in the preinit now.

 

I do get this error in my console:

[16:38:15] [Client thread/ERROR] [FML]: Exception loading model for variant tmm:epicbudder22_ore#inventory for item "tmm:epicbudder22_ore", blockstate location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model tmm:epicbudder22_ore#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: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_101]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_101]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_101]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?: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(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_101]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_101]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?: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:1184) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
... 23 more

 

except 7 times, once for each block. I see something about my blockstate.

 

On of my blockstates:

{
    "variants": {
        "normal": { "model": "tmm:epicbudder22_ore" }
    }
}

 

and just for it, one of my models in the models.block:

 

{
    "parent": "block/cube_all",
    "textures": {
        "all": "tmm:blocks/epicbudder22_ore"
    }
}

 

(PS, do I need a model in the models.item too for blocks?)

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

bump

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

You need to add the inventory variant to your blockstate JSON or make an

Item

model JSON for your blocks.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

Hey Guys,

I might have a simmilar issue. My Mod is loading fine and there is no complaint over any json errors, but the block Texture cant be found...

Forge Version: 12.18.3.2185

 

[11:23:52] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
[11:23:52] [Client thread/ERROR] [TEXTURE ERRORS]: The following texture errors were found.
[11:23:52] [Client thread/ERROR] [TEXTURE ERRORS]: ==================================================
[11:23:52] [Client thread/ERROR] [TEXTURE ERRORS]:   DOMAIN mymod
[11:23:52] [Client thread/ERROR] [TEXTURE ERRORS]: --------------------------------------------------
[11:23:52] [Client thread/ERROR] [TEXTURE ERRORS]:   domain mymod is missing 1 texture
[11:23:52] [Client thread/ERROR] [TEXTURE ERRORS]:     domain mymod has 1 location:
[11:23:52] [Client thread/ERROR] [TEXTURE ERRORS]:       mod mymod resources at C:\Users\myname\workspace\Modding\MyMod\bin
[11:23:52] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------
[11:23:52] [Client thread/ERROR] [TEXTURE ERRORS]:     The missing resources for domain mymod are:
[11:23:52] [Client thread/ERROR] [TEXTURE ERRORS]:       textures/blocks/solid/ore_rutile.png
[11:23:52] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------
[11:23:52] [Client thread/ERROR] [TEXTURE ERRORS]:     No other errors exist for domain mymod
[11:23:52] [Client thread/ERROR] [TEXTURE ERRORS]: ==================================================
[11:23:52] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

allthough its exactly in the right place! Both

C:\Users\myname\workspace\Modding\MyMod\bin\assets\mymod\textures\blocks\solid\ore_rutile.png

and

C:\Users\myname\workspace\Modding\MyMod\resources\assets\mymod\textures\blocks\solid\ore_rutile.png

 

Its Block Constructor and Model init are both called in preInit.

 

Its Blockstate points to "Textures":{"all": "mymod:blocks/solid/ore_rutile"}, for all Variants(default, normal and inventory).

 

It accesses the domain just fine for the blockstate, block and item json...

Im highly confused, since everything appears to be in the right place...

 

 

Link to comment
Share on other sites

Alright, would the item model json be the same/similar (

{
    "parent": "item/generated",
    "textures": {
        "layer0": "MODID:[blocks or items here?]/(BLOCKNAME)"
    }
}

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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