Jump to content

Forge 1.20.1 - Hats


Tsuk1

Recommended Posts

"It does not work" is not a bug report.

If you want help you need to post a reproducable example of your problem on github.

 

Any questions about blockbench should be directed to them.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

1 hour ago, warjort said:

"It does not work" is not a bug report.

If you want help you need to post a reproducable example of your problem on github.

 

Any questions about blockbench should be directed to them.

Oh, I'm sorry, i'll try to be more specific next times,
So, the problem is not really blockbench, like, I make a model there and then export it, and I code the item but it doesn't get the texture and i don't know how to get it, now i'm trying to use the canEquip method to get the texture as an item instead of as an armor, but it still doesn't get the texture.
Here is the github repo: https://github.com/P3terD/myths-mod
Here is the item file: https://github.com/P3terD/myths-mod/blob/main/src/main/java/net/tsuk1/mythsmod/item/custom/YankeeCapItem.java
Here are the item models files: https://github.com/P3terD/myths-mod/tree/main/src/main/resources/assets/mythsmod/models/item
I don't know if the problem in on my "yankee_cap.json" model or where they are, but it still don't get the texture.

Link to comment
Share on other sites

I know little about BlockBench, but I suspect what you have done is create a model for an optifine only feature?

e.g. your model files look very similar to these: https://github.com/moonbutters/ConeyHatPack/tree/main/assets/minecraft/optifine/cit

 

If you don't want to make your item into a helmet which will use the rendering for the builtin armor model

and you still want to use those models,

then you will have to render the hat yourself using an EntityRenderer layer.

 

See for example vanilla's CustomHeadLayer that renders skulls when players wear them.

You use this event to register new layers.

https://github.com/MinecraftForge/MinecraftForge/blob/817e20821d04225e2b39e2ce64be9b70c8ddfa27/src/main/java/net/minecraftforge/client/event/EntityRenderersEvent.java#L121

NOTE: For players you add layers to each skin's EntityRenderer because there are different renderers for each skin type.

 

You can also search github to see how other mods do custom hats:

https://github.com/search?q=minecraft hat&type=repositories

Maybe somebody has already written some code to render those models without using optifine?

Edited by warjort

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

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.