Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello!!!
How can i code wereable hats with my blockbenchs textures? I tried making it as a helmet but it didn't work

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

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

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.

  • Author
3 hours ago, Unknown_303 said:

 

@Tsuk1 You could use this tutorial that uses GeckoLib 4:

https://www.youtube.com/watch?v=3zqxU7vjHmQ

It is designed for 1.19.4 but it works for 1.20.1, I have tested.

All you would need to do is only make it for a helmet.

 

I'm not sure how you would do the general item model.

It worked!!! Thank you!

  • 1 year later...

@Tsuk1 Also, new note, you can use blockbench to make the custom item model for when it is not on the head.

 

EDIT: Funny story, I am making a mod similar to yours! Mine is called NorseMC.

Edited by Unknown_303

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.