Jump to content

Recommended Posts

Posted

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

  Reveal hidden contents

java\main\ModItems.java

  Reveal hidden contents

java\client\ItemsModelsHandler.java

  Reveal hidden contents

java\items\ItemChainMail.java

  Reveal hidden contents

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

  Reveal hidden contents

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.

Posted

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();

Expand  

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

 

Also also also:

  Quote

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

Expand  

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.

Posted
  On 3/11/2017 at 1:52 AM, 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()

 

 

Expand  

This is what my RenewabilityMod class looks like right now.

  Reveal hidden contents
  On 3/11/2017 at 1:52 AM, Draco18s said:

Show the game's output log.

The game prints all texture loading problems there.

 

Expand  

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

  Reveal hidden contents
  On 3/11/2017 at 1:52 AM, Draco18s said:

 

Also:

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

 

Expand  

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.

Posted

Proxies are not a Java thing.

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

  On 3/12/2017 at 1:55 AM, an_awsome_person said:

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

Expand  
  On 3/12/2017 at 1:55 AM, an_awsome_person said:

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

Expand  
  On 3/12/2017 at 1:55 AM, an_awsome_person said:

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

Expand  

 

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.

Posted
  On 3/12/2017 at 2:15 AM, Draco18s said:
Expand  

Can you teach me how to use proxies? 

  On 3/12/2017 at 2:15 AM, Draco18s said:


Your blockstate file lacks an inventory variant 

Expand  

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.

Posted
  On 3/13/2017 at 3:18 AM, an_awsome_person said:

Can you teach me how to use proxies? 

Expand  

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

  Quote

How do I fix this?

Expand  

...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.

Posted
  On 3/11/2017 at 1:43 AM, an_awsome_person said:
  Reveal hidden contents

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

Expand  
  Quote

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

Expand  

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.

Posted
  On 3/13/2017 at 7: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.

Expand  

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.

Posted
  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"));

 

Expand  

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.

Posted
  On 3/20/2017 at 2:41 AM, Draco18s said:

Why are you using both the ModelLoader and the ModelMesher?

I told you to replace the one with the other.

Expand  

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.

Posted

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.

Posted
  On 3/25/2017 at 10:38 PM, Draco18s said:

And what does your code look like now?

Expand  
  Reveal hidden contents

 

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.

Posted (edited)
  On 3/26/2017 at 10: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?

Expand  

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

  Reveal hidden contents
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.

Posted
  On 3/12/2017 at 1:55 AM, an_awsome_person said:

I know almost nothing about Java

Expand  

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 4:24 PM, an_awsome_person said:

What's preInit, again?

Expand  

... 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.

Posted
  On 4/7/2017 at 4:58 PM, 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.

Expand  

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

  On 4/7/2017 at 6:09 PM, 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...

 

Expand  

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.

Posted

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.

Posted (edited)
  On 4/9/2017 at 10:41 PM, an_awsome_person said:

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

Expand  

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.

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.