HomeJavaModsGeoTetraItem
GeoTetraItem
ModsJava

GeoTetraItem

by yiran1457 · on CurseForge

⬇ Download on CurseForge

The author built this one for Minecraft 1.20.1 on Forge. On other versions it may install and then do nothing.

This mod itself does not register any items.
You need to manually create the JSON files and place them in the config/GeoTetraItem/ folder to register items.

Example:
config/GeoTetraItem/example.json

{
  "id": "namespace:example",
  "slots": [
    {
      "type": "major",
      "required": true,
      "name": "example/slot1",
      "x": 15,
      "y": 15
    },
    {
      "name": "example/slot2",
      "x": 15,
      "y": 5
    },
    {
      "name": "example/slot3",
      "x": 15,
      "y": -10
    },
    {
      "type": "minor",
      "name": "example/slot4",
      "x": -25,
      "y": 15
    }
  ],
  "canHone": true,
  "honeBase": 200,
  "honeMultiplier": 450
}

Modular Items registered via GeoTetraItem will only render models whose type starts with "gecko".

{
  "availableTextures": [ "base" ],
  "models": [
    {
      "type": "gecko",
      "location": "namespace:item/vanilla/"
    }
  ]
}

If you are a mod developer, you only need to have your item class implement the IGeoRenderTetraItem interface.


public class ExampleItem extends ItemModularHandheld implements IGeoRenderTetraItem<ExampleItem> {
    private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
    public Cache<String, List<GeoTetraItemRenderer<ExampleItem>>> rendererCache = CacheBuilder.newBuilder().maximumSize(1000L).expireAfterWrite(10L, TimeUnit.MINUTES).build();
    
    public ExampleItem(Properties properties) {
        super(properties);
    }

    @Override
    public Cache<String, List<GeoTetraItemRenderer<ExampleItem>>> getRendererCache() {
        return rendererCache;
    }

    @Override
    public void registerControllers(AnimatableManager.ControllerRegistrar controllerRegistrar) {

    }

    @Override
    public AnimatableInstanceCache getAnimatableInstanceCache() {
        return cache;
    }
}

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more