Jump to content

[1.12.2] Custom model doesn't render correctly


Spaceboy Ross

Recommended Posts

This is what the model is supposed to look like.

358283632_Screenshotfrom2018-10-0108-39-38.thumb.png.3c7f119104bc1e1267d158ff97c63ec8.png

But this is what it looks like in game.

2018-10-01_08_41_16.png.49a233a6d3652f0c320813c253140dff.png

The class of the model is com.spaceboyross.gundam.models.ms.gundams.RX782GundamMobileSuitModel. I have the mod stored on github: https://github.com/SpaceboyRoss01/MSGundamMod

Edited by Spaceboy Ross
Mod has moved from 1.12 to 1.12.2

The official YouTuber Spaceboy Ross

Link to comment
Share on other sites

I couldn’t find any client/rendering package, where is your model rendering code?

 

Your entity.render package doesn’t appear to contain any code relevant to rendering your entity

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

11 hours ago, Cadiboo said:

I couldn’t find any client/rendering package, where is your model rendering code?

 

Your entity.render package doesn’t appear to contain any code relevant to rendering your entity

The entity.render package is for non-Mobile Suit type entities. com.spaceboyross.gundam.models.ms.gundams.RX782GundamMobileSuitModel is the RX-78-2 Gundam Mobile Suit model class. So the com.spaceboyross.gundam.models.ms package is for the models for Mobile Suits.

The official YouTuber Spaceboy Ross

Link to comment
Share on other sites

10 minutes ago, Spaceboy Ross said:

The entity.render package is for non-Mobile Suit type entities. com.spaceboyross.gundam.models.ms.gundams.RX782GundamMobileSuitModel is the RX-78-2 Gundam Mobile Suit model class. So the com.spaceboyross.gundam.models.ms package is for the models for Mobile Suits.

Not where is your model, where is the code that makes it appear on the screen?

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

15 minutes ago, Spaceboy Ross said:

Oh, that is com.spaceboyross.gundam.ms.MobileSuit.MSRender

Does this return the correct ResourceLocation?

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

You should probably consider splitting up your client/common/server code more (this will probably crash on a dedicated server)

 

Also NEVER return a null itemstack. Return ItemStack.EMPTY.

`public ItemStack getRequiredItemToPilot() {

    return null;

}`

 

What exactly is going wrong with your model? How are you loading the model?

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

8 hours ago, Spaceboy Ross said:

Yes it does

Check what texture is bound in your render code in the debugger.

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

Wait is it just the parts of the model with rotation that are rendering weirdly? If so I think that it might be something wrong with BlockBench’s model renderer OR the rotations/translations are being applied. Try toggling the checkbox inside BlockBench that says Origin To Geometry. Try making a smaller model with rotated pieces and also look at the JSON model text and see if the sizes look correct.

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

3 hours ago, Cadiboo said:

You should probably consider splitting up your client/common/server code more (this will probably crash on a dedicated server)

 

Also NEVER return a null itemstack. Return ItemStack.EMPTY.

`public ItemStack getRequiredItemToPilot() {

    return null;

}`

 

What exactly is going wrong with your model? How are you loading the model?

I've fixed it so the function returns ItemStack.EMPTY since I recently found that out before you told me and the model is rendering from the MobileSuit.MSRenderer class. Also, I didn't make the model, the model designer member made it.

The official YouTuber Spaceboy Ross

Link to comment
Share on other sites

Wait so is your problem solved? Cause if not...

4 hours ago, Cadiboo said:

Wait is it just the parts of the model with rotation that are rendering weirdly? If so I think that it might be something wrong with BlockBench’s model renderer OR the rotations/translations are being applied. Try toggling the checkbox inside BlockBench that says Origin To Geometry. Try making a smaller model with rotated pieces and also look at the JSON model text and see if the sizes look correct.

 

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

39 minutes ago, Spaceboy Ross said:

It's only the head that doesn't render correctly, the head rendered correctly in blockbench and other programs.

Find out which one of these method calls is adding the head box and then change the position that it is being placed at.

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

It looks to me as though the only things that are rendering wrong are the “horns” (which both have rotations applied to them) and the 2 “torso” parts that have rotation applied to them. Additionally I think your arms are being rendered wrongly (rotated an extra 90deg Y). Because all your variables are named “e1” or similar, I can’t really see which ones are which and what they correspond to in the actual json model.

Edit: I assume they’re e27 & e28, you might want to set the rotation point & the rotation before making the box?

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 hour ago, Cadiboo said:

I can’t really see which ones are which and what they correspond to in the actual json model.

It's an entity there is no JSON model. This is a java model.

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

30 minutes ago, Animefan8888 said:

It's an entity there is no JSON model. This is a java model.

Which has been created by first making a JSON model & then copying the values to Java? Or am I wrong and BlockBench can make Java models?

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

14 minutes ago, Cadiboo said:

Which has been created by first making a JSON model & then copying the values to Java?

No, by the looks of it, it was made with Techne.

 

14 minutes ago, Cadiboo said:

Or am I wrong and BlockBench can make Java models?

It might be able to, haven't used BlockBench. Plus you don't know if the modeler used that program.

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

10 hours ago, Spaceboy Ross said:

Blockbench has an "export to java" plugin and that's how I got the model exported.

Interesting, I think that that plugin may not have been properly tested with rotated boxes and might not be outputting your boxes with rotations correctly. I think that you should rename all your variables to make the code readable, and try moving the calls to setRotationPoint and setRotateAngle around (maybe swap which one gets called first? maybe move them above the call to addBox?)

I think that when the model is rendered it’s getting scaled before rotated when it should be getting rotated before scaled (or visa versa).

 

23 hours ago, Animefan8888 said:

you don't know if the modeler used that program.

26128266-3F47-4004-B11F-67C8BC7E88B4.thumb.jpeg.e64991cd8a0ebc334f4bbca361e2295c.jpeg

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

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.