Jump to content

[SOLVED][1.12.2] Some explanation on ICustomModelLoader


Recommended Posts

Posted (edited)

Hey, I just started my adventure with Forge 1.12.2 and have to learn some things from the beginning.

 

First what I want to create is item with two different faces (standard item render, but front and back face vary).

That's what I come up with: https://pastebin.com/gBJ2fe4Z

Actually I need answers about if this is good path to create it and how to get item model json on public IModel loadModel(ResourceLocation modelLocation) in net.minecraftforge.client.model.ICustomModelLoader to load textures.

In net.minecraftforge.client.model.ModelLoader.VanillaLoader there's some code that actually load json model, but it uses resources that are private or protected.

 

Thanks for any further feedback.

 

Edited by Soukyan
Typo in topic
Posted
On 11/13/2018 at 11:51 AM, Soukyan said:

Actually I need answers about if this is good path to create it

No it isnt.

 

Instead you should just create a custom Json model that uses two elements and two textures. You can use any modeling program for vanilla json models to create it.

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.

Posted

Yea, but it's not normal model replacement, it uses original minecraft item render from net.minecraftforge.client.model.ItemLayerModel (which render item basing on texture). It'll be not easy to convert this code to json. I figured out reading json model by net.minecraft.util.ResourceLocation.

Posted
1 hour ago, Soukyan said:

Yea, but it's not normal model replacement, it uses original minecraft item render from net.minecraftforge.client.model.ItemLayerModel (which render item basing on texture). It'll be not easy to convert this code to json. I figured out reading json model by net.minecraft.util.ResourceLocation.

What do you mean? Just make a cuboid with different textures on different sides in JSON. You can make a parent model that just deals with the back and sides, and have child models that specify the front texture.

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)

Posted

The non-cuboid form might be a bit of an issue, but it is achievable. You might want to use a different model format though

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)

Posted

What do you mean by different model format? Give me more accurate hint, so I can do the rest.

Posted
15 minutes ago, Soukyan said:

What do you mean by different model format?

I assume he means you might want to use .obj file instead of a .json file.

2 hours ago, Soukyan said:

which only renders face front and back?

What does that mean? Do you mean two different textures one facing the player the other facing away? Then yes. If not what I suggested could you share a picture of the whole item in a 3D view?

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.

Posted

Posted in the post before, but here's it https://imgur.com/IHC4tsw (it's actually the back face of the item, which is facing away from the player). I don't see a sense of creating obj model just for thing which can be achieved by code easly.

Posted
16 minutes ago, Soukyan said:

Posted in the post before, but here's it https://imgur.com/IHC4tsw (it's actually the back face of the item, which is facing away from the player).

That only shows one face I would like to see both.

17 minutes ago, Soukyan said:

I don't see a sense of creating obj model just for thing which can be achieved by code easly

You shouldn't be using code where you can use something data oriented like an .obj model or a .json model.

 

To create a .json model file you can type it out yourself or use a modeling application, some such applications are blockbench and cubik.

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.

Posted (edited)

Well, thanks @Cadiboo for your assistance and you @Animefan8888 for making things right.

 

Don't see the topic lock option for author, so I'd be nice if someone would do it for me.

Edited by Soukyan
Posted
9 hours ago, Soukyan said:

Well, thanks @Cadiboo for your assistance and you @Animefan8888 for making things right.

 

Don't see the topic lock option for author, so I'd be nice if someone would do it for me.

Edit your original post and add "[SOLVED] " to the title, and please post your solution for people in the future.

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)

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.