Package net.minecraftforge.client.event
Class EntityRenderersEvent.AddLayers
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.EntityRenderersEvent
net.minecraftforge.client.event.EntityRenderersEvent.AddLayers
- All Implemented Interfaces:
IModBusEvent
- Enclosing class:
- EntityRenderersEvent
Provides a safe place to register entity renderer layers.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.client.event.EntityRenderersEvent
EntityRenderersEvent.AddLayers, 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
-
Field Summary
Modifier and TypeFieldDescriptionprivate EntityModelSet
private Map<EntityType<?>,EntityRenderer<?>>
private Map<String,EntityRenderer<? extends Player>>
-
Constructor Summary
ConstructorDescriptionAddLayers(Map<EntityType<?>,EntityRenderer<?>> renderers, Map<String,EntityRenderer<? extends Player>> playerRenderers)
-
Method Summary
Modifier and TypeMethodDescription<T extends LivingEntity, R extends LivingEntityRenderer<T, ? extends EntityModel<T>>>
RgetRenderer(EntityType<? extends T> entityType)
Returns an entity renderer for the given entity type.<R extends LivingEntityRenderer<? extends Player, ? extends EntityModel<? extends Player>>>
RReturns a player skin renderer.getSkins()
Returns the list of skins.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
renderers
-
skinMap
-
entityModels
-
-
Constructor Details
-
AddLayers
public AddLayers(Map<EntityType<?>,EntityRenderer<?>> renderers, Map<String,EntityRenderer<? extends Player>> playerRenderers)
-
-
Method Details
-
getSkins
Returns the list of skins. -
getSkin
@Nullable public <R extends LivingEntityRenderer<? extends Player, ? extends EntityModel<? extends Player>>> R getSkin(String skinName)Returns a player skin renderer. Vanilla skins are "default" and "slim".- Type Parameters:
R
- The type of the skin renderer, usually PlayerRenderer- Parameters:
skinName
- The name of the skin renderer to return- Returns:
- The skin renderer, or null if not found
-
getRenderer
@Nullable public <T extends LivingEntity, R extends LivingEntityRenderer<T, ? extends EntityModel<T>>> R getRenderer(EntityType<? extends T> entityType)Returns an entity renderer for the given entity type.- Type Parameters:
T
- The type of entity the renderer is forR
- The renderer type- Parameters:
entityType
- The entity to return a renderer for- Returns:
- The renderer
-
getEntityModels
-