Package net.minecraftforge.client.event
Class EntityRenderersEvent.RegisterLayerDefinitions
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.EntityRenderersEvent
net.minecraftforge.client.event.EntityRenderersEvent.RegisterLayerDefinitions
- All Implemented Interfaces:
IModBusEvent
- Enclosing class:
- EntityRenderersEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.client.event.EntityRenderersEvent
EntityRenderersEvent.AddLayers, EntityRenderersEvent.CreateSkullModels, EntityRenderersEvent.RegisterLayerDefinitions, EntityRenderersEvent.RegisterRenderers
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
registerLayerDefinition
(ModelLayerLocation layerLocation, Supplier<LayerDefinition> supplier) Registers a layer definition supplier with the givenModelLayerLocation
.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Constructor Details
-
RegisterLayerDefinitions
public RegisterLayerDefinitions()
-
-
Method Details
-
registerLayerDefinition
public void registerLayerDefinition(ModelLayerLocation layerLocation, Supplier<LayerDefinition> supplier) Registers a layer definition supplier with the givenModelLayerLocation
. These will be inserted into the main layer definition map for entity model layers at the appropriate time.- Parameters:
layerLocation
- The model layer location, which should be used in conjunction withEntityRendererProvider.Context.bakeLayer(ModelLayerLocation)
supplier
- A supplier to create aLayerDefinition
, generally a static method reference in the entity model class
-