-
Notifications
You must be signed in to change notification settings - Fork 0
Authoring Models
To make it easier to create and test models it is HIGHLY recommended to create a local test pack. Create a normal resource pack using "packer_id" as your identifier. As well as putting all textures into the textures/items directory. The resulting file structure will be the following.
PackerTestPack
- assets
- packer_id
- items
- models
- textures
- item
- pack.mcmeta
pack.mcmeta will look something like this:
{
"pack": {
"description": "Packer test pack",
"min_format": 69,
"max_format": 75
}
}
To avoid being overly verbose or confusing we will not go into every detail of creating models for resource packs. Only some of the key things to keep in mind.
All files uploaded using Packer upload into a private directory under your Minecraft UUID. This means you cannot edit others directories or importantly the Minecraft directory. To avoid dealing with long and cumbersome UUID's you can use the short hand "packer_id" in any json file. This might sound confusing so lets look at a very basic textured item!
The item definition tells Minecraft and by extension packer where to find the model data for your asset. This is what you access when using /packer model set your_model. For our example item we will be using the following json. Place this into your local items directory to avoid confusion with the model! They will in many cases have the same name.
{
"model": {
"type": "minecraft:model",
"model": "packer_id:your_model"
}
}
Where the "model" points to a json file in the model directory.
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "packer_id:item/your_texture"
}
}
This example creates a item with a generate model. Pointing to a texture in the textures/item directory. ALL textures in packer will be in the item directory. This is due to a quirk with how textures get loaded. For more complex models it is heavily recommended to use a tool such as blockbench to author them.
Please note that all textures MUST be a resolution of n^2! (i.e 16x, 32x, 64x, etc)
It is recommended you test your pack before continuing to the upload step! To do so you will copy your local test pack to your resource pack folder and apply it. Once applied (or before) enter a single player world with cheats enabled. Run the command /give @s minecraft:stick[minecraft:item_model="packer_id:your_model"]. If the model loads correctly you did everything correct and are ready to upload!
TODO: Trouble shooting steps (check logs and google for now)
To upload files we will be using the web UI packaged with the Packer mod. To get the link as configured by your the server admin you can run the in game command /packer link. Please note that this UI is work in progress at the time of writing. Elements may be located in different places.
Upon opening the link in a web browser you will be prompted to enter a authentication code. You can get this by running /packer auth in game. Please note that upon logging out of the game all sessions and codes will expire.

Once you authenticate you will enter the "upload manager". On this page you will be able to upload and remove uploaded files.

To upload a model you will need to upload all three previously authored files. So to recap that will be a "item definition" located in the items directory. A model located in the models directory. And lastly the texture(s) located in the "textures/item" directory.
Under the upload portion of the page select the "type" drop down. Select the type of file you wish to upload. Then click "browse" and locate the file you wish to upload. Finally click "Upload"! Repeat for all the files you wish to upload.
You are almost there! Now all that's left to do is load your models in game. Once you are done uploading ALL the files you wish to upload, you can run the command /packer rezip. This will trigger packer to create a new resource pack containing the new or changed models. Please note this is a heavy command and access may be limited by your server admin!
Upon the pack being re-zipped you may run the command /packer pack to load the new resource pack. To apply your model to an item simply run /packer model set your_model while holding the item you wish to remodel! (You can run /packer model reset to reset the model back to the vanilla model)
CONGRATULATIONS!!! You now have your very own custom model in-game!