Skip to main content
Version: GeckoLib5

Copy-Paste Templates

Just looking for some template code to copy-paste?
See below for some existing code you can use to get you started.

Entity Class

public class ExampleEntity extends PathfinderMob implements GeoEntity {
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);

public ExampleEntity(EntityType<? extends PathfinderMob> entityType, Level level) {
super(entityType, level);
}

@Override
public void registerControllers(final AnimatableManager.ControllerRegistrar controllers) {

}

@Override
public AnimatableInstanceCache getAnimatableInstanceCache() {
return this.geoCache;
}
}

Entity Renderer

// Registering the renderer
context -> new GeoEntityRenderer<>(context, EntityRegistry.EXAMPLE_ENTITY.get());