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

public static class EntityRenderersEvent.AddLayers extends EntityRenderersEvent
Fired for registering entity renderer layers at the appropriate time, after the entity and player renderers maps have been created.

This event is not cancellable, and does not have a result.

This event is fired on the mod-specific event bus, only on the logical client.

  • Field Details

  • Constructor Details

  • Method Details

    • getSkins

      public Set<String> getSkins()
      Returns the set of player skin names which have a renderer.

      Minecraft provides two default skin names: default for the regular player model and slim for the slim player model.

      Returns:
      the set of player skin names which have a renderer
    • getSkin

      @Nullable public <R extends LivingEntityRenderer<? extends Player, ? extends EntityModel<? extends Player>>> R getSkin(String skinName)
      Returns a player skin renderer for the given skin name.
      Type Parameters:
      R - the type of the skin renderer, usually PlayerRenderer
      Parameters:
      skinName - the name of the skin to get the renderer for
      Returns:
      the skin renderer, or null if no renderer is registered for that skin name
      See Also:
    • 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 for
      R - the type of the renderer
      Parameters:
      entityType - the entity type to return a renderer for
      Returns:
      the renderer, or null if no renderer is registered for that entity type
    • getEntityModels

      public EntityModelSet getEntityModels()
      Returns the set of entity models.
      Returns:
      the set of entity models