Creating a custom hat
Hats are created using BlockBench. It is recommended to install it, but you can also use the web app.
If you have any issues, you can get support on my discord server.
- Hats are stored as block models, so create a new
Java Block Model
- Name the file in all lowercase without any spaces. This will be the hats ID
- Create the model and textures, tutorials on how to use BlockBench can be found online. Here is a decent one I found. The resource pack parts aren't relevant
In order for your textures to work, you have to do a few things.
- Right click your texture file and click
Properties
.
- Set the
Folder
toblock
- Set the
Namespace
tofedora
To view your hat in blockbench, click display
in the top right, then set the slot to Head
.
Your hat may not be in the spot you want it to be. Simply adjust the rotation, translation, and scale on the left side until it's in a position your happy with. That's how it will appear in game.
To view your hat in game, export/save your model json and texture png.
Navigate to your minecraft config
folder then open the fedora
folder then the hats
folder.
Place your hat model json file in the models
folder, and your texture png file in the textures
folder.
Run the game!
When you hover over your hat in the hat menu, you can see that the creator is Made with BlockBench
.
You can change this in BlockBench by going to File > Preferences > Settings > Export > Credit Comment
and putting your username there. You can also manually change it inside the json file.
Right now your hat is named fedora.hat.hatid
. That's not what we want!
To add translations to your hat, open your model json file in notepad or any other text editor.
Below "credit": "Username",
add
"lang": {
"en_us": "Blast Off!",
"en_au": "Australian Blast Off!"
},
Feel free to add as many or as few languages as you want. You can find a list of all language codes here
By default, all hats are common. To set your hats rarity, open your model json file in notepad or any other text editor.
Below the language stuff, add
"rarity": "COMMON",
If you want a different rarity, the supported rarities are
COMMON
UNCOMMON
RARE
EPIC
If your hat uses any partially transparent textures, you have to mark it as such.
Once again, open your model json file in notepad or any other text editor. Add this below rarity
"translucent": true,
If you don't need translucent textures, set it to false or just leave this line out entirely.
By default, hats automatically shift up when you put on a helmet. If you have something like goggles that you don't want to move when you equip a helmet, add this line to your model json.
"ignoreHelmet": true,
If you want it to move with the helmet, set it to false or just leave this line out entirely.
{
"credit": "Potatoboy9999",
"rarity": "RARE",
"lang": {
"en_us": "Blast Off!"
},
"textures": {
"0": "fedora:block/rocket",
"particle": "fedora:block/rocket"
},
"elements": [
Model stuff
]
}
For more examples look here
Want to add your cool new hat to the mod, read more here