Skip to content

Render Layers (Geckolib3)

Tslat edited this page Jul 3, 2023 · 2 revisions

Like all vanilla renderers, GeckoLib allows for additional layers of rendering over its normal rendering operations.

This is done through GeoLayerRenderer instances.

Usage

When instantiating your renderer, you can add a new layer to be called at render time to render additional content. This is done by calling addRenderLayer, and passing a new instance of your layer renderer to it.

Example Usage

public class ExampleRenderer extends GeoEntityRenderer<ExampleEntity> {
	public ExampleRenderer(EntityRendererProvider.Context renderManager) {
		super(renderManager, new ExampleEntityModel());

		addRenderLayer(new ExampleGeoRenderLayer(this));
	}
}
Clone this wiki locally