Skip to content

Creating a custom hat

Potatoboy99999 edited this page Dec 14, 2020 · 17 revisions

Setup

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.

Creating The Model

  1. Hats are stored as block models, so create a new Java Block Model

  1. Name the file in all lowercase without any spaces. This will be the hats ID

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

Textures

In order for your textures to work, you have to do a few things.

  1. Right click your texture file and click Properties.

  1. Set the Folder to block
  2. Set the Namespace to fedora

Aligning and Testing

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.

Viewing 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!

Finishing Touches

Creator

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.

Lang

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

Rarity

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

Translucent Textures

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.

Ignore Helmet

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.

Example Json

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