Skip to content

Custom Resource Pack

Memory edited this page Aug 20, 2026 · 2 revisions

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.

Directory Structure

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 from textures/item.

The resource pack metadata file is pack.mcmeta.

File Naming

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

Definition Configuration

The complete format is:

{
  "item": "modid:example_item",
  "invisible": [
    "some_bone"
  ],
  "sounds": {
    "SoundKeyFrameName": "food:SoundName"
  }
}

item

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.

invisible

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.

sounds

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.

Animation Requirements

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.

Using the Example Pack

  1. Copy the example_resourcepack directory to Minecraft's resourcepacks directory, or compress it into a ZIP file and place it there.
  2. Open assets/food/definitions/example_item.json.
  3. Replace modid:example_item with the ID of a real item.
  4. Make sure the bone names in the model match the invisible configuration.
  5. 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.