Skip to main content
Version: GeckoLib5

Creating the Renderer

Once you've made your item class and registered your item, you can now create the renderer and apply it.

Making the class

Simple Renderer Class

By default, GeckoLib does not require a custom renderer class, and you can instead just pass a new instance of GeoItemRenderer when apply your renderer.

If you do not require any custom handling of your item's rendering, this is the recommended approach.

E.G.

// Applying the renderer
() -> new GeoItemRenderer<>(ExampleItem.this);

The asset files

If you followed the above instructions, GeckoLib will be looking for your asset files (.geo.json, .animation.json, .png) in the /item/ subdirectory, named the same as your item's registered id.

For example, if your item was registered as example_item, your files should be:

  • Model: resources/assets/<mod_id>/geckolib/models/item/example_item.geo.json
  • Animations: resources/assets/<mod_id>/geckolib/animations/item/example_item.animation.json
  • Texture: resources/assets/<mod_id>/textures/item/example_item.png

Where <mod_id> is the id of your mod.

See the Placing the Files page for more information on where to place these files.