Jump to content

Armor Model does not Initialize.


InternalCow

Recommended Posts

Error Log: https://pastebin.com/PjKwnPvg

ModItems: https://pastebin.com/ZfeJvZyz

 

The error log says on line 51 of ModItems there is an error. I have no idea what is wrong, however.  I think it has to do something with when the mod registers the armor models.  This applies to lines 51-54.  I used MCJty's tutorials to learn modding, but he has not provided an armor tutorial, so any help would be much appreciated :)

Link to comment
Share on other sites

Non broken links:

https://pastebin.com/PjKwnPvg 

https://pastebin.com/ZfeJvZyz

 

I don’t see any problems with your code other than Mod Ids need to be lowercase. Also you should be able to just add @ObjectHolder to your ModItems class & name your items the same names as the variables. Also, you haven’t shown where your method is being called from, and please use a GitHub repository for posting code. Pastebin & GitHubGist are fine for logs but they don’t really work for code.

Edited by Cadiboo

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

1) Code Style#2 - A common proxy doesn’t make sense. Proxies hold code that runs on both sides BUT DOES DIFFERENT THINGS. If the code does the same thing on both sides (common code) it shouldn’t be in a proxy. Put it literally anywhere else

2) Please reorganise your packages into the way vanilla does it

3) 

26 minutes ago, Cadiboo said:

Mod Ids need to be lowercase

You mod Id is “Boundless”.

4) 

28 minutes ago, Cadiboo said:

just add @ObjectHolder to your ModItems class & name your items the same names as the variables.

 

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

1) Yeah, makes sense I don't know why he did it like that

2) ¯\_(ツ)_/¯

3) Our modid is "boundless"

4) For example

@GameRegistry.ObjectHolder("boundless:leather_sword")
public static LeatherSword leather_sword;

 

 

Edited by Synoot
Link to comment
Share on other sites

11 minutes ago, Synoot said:

1) Yeah, makes sense I don't know why he did it like that

2) ¯\_(ツ)_/¯

3) Our modid is "boundless"

4) For example


@GameRegistry.ObjectHolder("boundless:leather_sword")
public static LeatherSword leather_sword;

 

 

Uh...

F89D3C39-AB20-445E-9BE6-A793C5B63AB1.thumb.png.dcf01f3216f5d76bccf816fc9cf67bc3.png

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

Just now, Cadiboo said:

Uh...

F89D3C39-AB20-445E-9BE6-A793C5B63AB1.thumb.png.dcf01f3216f5d76bccf816fc9cf67bc3.png

Try doing MOD_ID+":"+"name" next time

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

1 minute ago, InternalCow said:

Note, that I said in my original post, that I used McJty's tutorials to learn modding, this is generally how he did it in those tutorials.

Just because that's how they did it does not mean it is correct. It simply doesn't crash.

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

2 minutes ago, Draco18s said:

Just because that's how they did it does not mean it is correct. It simply doesn't crash.

Yes, but the thing is, he doesn't have any armor tutorials etc.  I had to use other tutorials and bend it to the way I learned (McJty).  Also, it being not correct, the only issue I have is with the Armor, everything else works.  I even got ore generation to work.

Edited by InternalCow
Fixed things.
Link to comment
Share on other sites

1 minute ago, InternalCow said:

everything else works.

for now.

That said, the "code style" type issues are ones that are just bad practice, not that they cause the game to break. In some cases it makes things more complicated than they need to be (IHasModel) and in some cases simplifies something that shouldn't be (Proxies).

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

28 minutes ago, Draco18s said:

for now.

That said, the "code style" type issues are ones that are just bad practice, not that they cause the game to break. In some cases it makes things more complicated than they need to be (IHasModel) and in some cases simplifies something that shouldn't be (Proxies).

I understand that IHasModel would work, possibly easier.  I don't want to restart because I already have this all done.  So, instead of making me restart my mod, you, or someone else could help me find an answer. And if there is none, i'll restart it.

Edited by InternalCow
Fixed Typo
Link to comment
Share on other sites

50 minutes ago, InternalCow said:

someone else could help me find an answer.

I believe if you are using @ObjectHolder the fields need to be public static final and equal to null. And the string passed into the annotations needs to match the registry name of the object. Also it seems that it is erroring on your Lunarium Sword because the field is null.

 

 

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

14 minutes ago, Animefan8888 said:

I believe if you are using @ObjectHolder the fields need to be public static final and equal to null. And the string passed into the annotations needs to match the registry name of the object. Also it seems that it is erroring on your Lunarium Sword because the field is null.

 

 

Can you show me some example code, what do you mean by make it public static?  (I know what it means, but where would I put it) . EDIT: I did all that you said, and I end up getting the same errors at lines 51-54.  I think it has to do with when it registers the models.

Edited by InternalCow
Fixed things.
Link to comment
Share on other sites

1 hour ago, InternalCow said:

I think it has to do with when it registers the models.

Of course it does the error is saying that your lunarium_sword field is null. Are you actually registering an instance of LunariumSword?

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

2 minutes ago, InternalCow said:

Hmm, okay let me check, I thought the error was with the armor, however.

Sorry I was off a line. It seems like your lunarium_helmet is null. Are you sure you registered an instance that has that registry name.

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

1 minute ago, Animefan8888 said:

Sorry I was off a line. It seems like your lunarium_helmet is null. Are you sure you registered an instance that has that registry name.

I've tested, and if I remove the lunarium_helmet, the same happens to the chestplate etc.  So it has to be something with all of them.

Link to comment
Share on other sites

7 minutes ago, InternalCow said:

I've tested, and if I remove the lunarium_helmet, the same happens to the chestplate etc.  So it has to be something with all of them.

Removed.

Edited by Animefan8888
Not needed.

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.