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
- Simple
- Advanced
- Fabric
- Forge
- NeoForge
// Registering the renderer
context -> new GeoEntityRenderer<>(context, EntityRegistry.EXAMPLE_ENTITY);
// Registering the renderer
context -> new GeoEntityRenderer<>(context, EntityRegistry.EXAMPLE_ENTITY.get());
// Registering the renderer
context -> new GeoEntityRenderer<>(context, EntityRegistry.EXAMPLE_ENTITY.get());
public class ExampleEntityRenderer<R extends EntityRenderState & GeoRenderState> extends GeoEntityRenderer<ExampleEntity, R> {
public ExampleEntityRenderer(EntityRendererProvider.Context context, EntityType<ExampleEntity> entityType) {
super(context, entityType);
}
}