-
Notifications
You must be signed in to change notification settings - Fork 11
Entity Fixers
The Mob Drops recipe category displays a small "entity icon" in the upper left corner of the recipe viewer pane (see below), similar to the creative inventory. Unfortunately, this renderer doesn't know exactly how to position every entity in the void of the icon area, so some entities end up incorrectly placed. Common issues:
- Entity is too high or low
- Entity does not fit properly in the box
- Entity is rotated incorrectly
Example recipe viewer pane with the mob "icon" |
---|
Entity fixers provide a solution to all these issues! To create an entity fixer, simply drop a .json
file in the following resource pack file path and start filling it in with fixer information!
Entity fixers are client-sided, so they go in your resource pack, or the assets folder of your mod.
./assets/<your_mod_id>/entity_fixers/<your_file_name>.json
The mod_id and file_name do not matter in this case.
The entity fixers uses the following json tags to define it's functionality:
Tag | Type | Required? | Usage |
---|---|---|---|
<your_entity_type> |
Json Object | Required | The root object of a fixer. The entity type identifier used as this tag name will define which entity is fixed. For example, to fix a skeleton, use "minecraft:skeleton". You can find the list of entity types in-game using the /summon command. |
offset |
Integer | Optional | The vertical offset of the entity in the box. Positive moves the entity down, negative up. |
scale |
Float | Optional | Defines the scaling to apply to the entity. 1.0 is no scaling, bigger numbers scale up, smaller numbers scale down |
x |
Float | Optional | Rotation of the entity in the X axis (typically the axis that pitches the entity forwards or backwards.) |
y |
Float | Optional | Rotation of the entity in the Y axis (typically the axis that spins the entity around like a top; it's yaw) |
z |
Float | Optional | Rotation of the entity in the Z axis (typically the axis that flips the entity around from side the side; it's roll) |
Below is an example entity fixer file. This file moves the cod upwards 17 pixels, and rotates it -90 degrees about it's spinal axis (flipping it from lying on its side to upright); and moves the chicken up 6 pixels and scales it up 25%; and moves the squid up 14 pixels.
{
"minecraft:cod": {
"offset": -17,
"z": -90.0
},
"minecraft:chicken": {
"offset": -6,
"scale": 1.25
},
"minecraft:squid": {
"offset": -14
}
}
The below file would move the chungus mob down 20 pixels, scale it up 10x, flip it over, turn it around, and pitch it straight up/down.
{
"big_boyos:chungus": {
"offset": 20,
"scale": 10.0,
"x": -90.0,
"y": 180.0,
"z": 180.0
}
}