Description
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;
}
}


