-
Notifications
You must be signed in to change notification settings - Fork 0
Custom Resource Pack
Kaleidoscope ImmersiveEating loads models, animations, definitions, sounds, and textures from resource packs. A minimal example pack is available in the example_resourcepack directory of the main repository.
example_resourcepack/
├── pack.mcmeta
└── assets/
└── food/
├── animations/
│ └── example_item.animation.json
├── definitions/
│ └── example_item.json
├── geo/
│ └── example_item.geo.json
├── sounds/
│ └── example_eating.ogg
├── sounds.json
└── textures/
└── item/
└── example_item.png
The following five directories are required:
-
animations: GeckoLib animation files. -
definitions: Item IDs, hidden bones, and sound mappings. -
geo: GeckoLib model files. -
sounds: Audio files. -
textures: Texture files. The mod currently reads item textures fromtextures/item.
The resource pack metadata file is pack.mcmeta.
The definition, model, animation, and texture files must share the same base name. For example:
definitions/example_item.json
geo/example_item.geo.json
animations/example_item.animation.json
textures/item/example_item.png
.geo.json and .animation.json are special suffixes. The complete filenames do not need to match each other, but their base name, example_item, must be the same.
The sound filename is determined by the sound ID path:
sounds/example_eating.ogg
It corresponds to the following entry in the definition:
"eating": "food:example_eating"The key eating must match the sound keyframe name in the animation file:
"sound_effects": {
"1.85": {
"effect": "eating"
}
}The complete format is:
{
"item": "modid:example_item",
"invisible": [
"some_bone"
],
"sounds": {
"SoundKeyFrameName": "food:SoundName"
}
}The registry ID of the item whose rendering should be replaced:
namespace:item_path
modid:example_item is only a placeholder and must be replaced with the ID of an actual item. Item paths should use lowercase letters, numbers, and underscores.
Lists the bone names that should be hidden while the item is idle. The example bone must exist in the bones section of example_item.geo.json; otherwise, the configuration will not work as expected.
Hiding a parent bone also hides all of its child bones. The mod restores these model parts while the eating animation is playing.
Maps animation sound keyframe names to sound events:
"sounds": {
"eating": "food:example_eating"
}The left-hand key, eating, must match the animation keyframe's effect. The right-hand value, food:example_eating, refers to assets/food/sounds/example_eating.ogg.
The animation file must contain an animation named eat:
{
"animations": {
"eat": {}
}
}Add a finished command to the end of the animation timeline:
"timeline": {
"12.0": "finished;"
}Without this command, the mod cannot properly run the cleanup logic after the eating animation ends.
- Copy the
example_resourcepackdirectory to Minecraft'sresourcepacksdirectory, or compress it into a ZIP file and place it there. - Open
assets/food/definitions/example_item.json. - Replace
modid:example_itemwith the ID of a real item. - Make sure the bone names in the model match the
invisibleconfiguration. - Enable the resource pack in Minecraft's resource pack menu.
The model, animation, texture, and sound in the example pack are placeholders for demonstrating the required structure. You can replace them with your own files while keeping the naming rules.