Class EntityRenderersEvent.CreateSkullModels
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.EntityRenderersEvent
net.neoforged.neoforge.client.event.EntityRenderersEvent.CreateSkullModels
- All Implemented Interfaces:
net.neoforged.fml.event.IModBusEvent
- Enclosing class:
EntityRenderersEvent
Fired for registering additional skull models at the appropriate time.
This event is not cancellable, and does not
.invalid reference
have a result
This event is fired on the mod-specific event bus, only on the logical client.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.client.event.EntityRenderersEvent
EntityRenderersEvent.AddLayers, EntityRenderersEvent.CreateSkullModels, EntityRenderersEvent.RegisterLayerDefinitions, EntityRenderersEvent.RegisterRenderers
-
Field Summary
Modifier and TypeFieldDescriptionprivate final com.google.common.collect.ImmutableMap.Builder
<SkullBlock.Type, SkullModelBase> private final EntityModelSet
-
Constructor Summary
ConstructorDescriptionCreateSkullModels
(com.google.common.collect.ImmutableMap.Builder<SkullBlock.Type, SkullModelBase> builder, EntityModelSet entityModelSet) -
Method Summary
Modifier and TypeMethodDescriptionReturns the set of entity models.void
registerSkullModel
(SkullBlock.Type type, SkullModelBase model) Registers the constructor for a skull block with the givenSkullBlock.Type
.
-
Field Details
-
builder
private final com.google.common.collect.ImmutableMap.Builder<SkullBlock.Type,SkullModelBase> builder -
entityModelSet
-
-
Constructor Details
-
CreateSkullModels
@Internal public CreateSkullModels(com.google.common.collect.ImmutableMap.Builder<SkullBlock.Type, SkullModelBase> builder, EntityModelSet entityModelSet)
-
-
Method Details
-
getEntityModelSet
Returns the set of entity models.- Returns:
- the set of entity models
-
registerSkullModel
Registers the constructor for a skull block with the givenSkullBlock.Type
. These will be inserted into the maps used by the item, entity, and block model renderers at the appropriate time.- Parameters:
type
- a unique skull type; an exception will be thrown later if multiple mods (including vanilla) register models for the same typemodel
- the skull model instance. A typical implementation will simply bake a model usingEntityModelSet.bakeLayer(ModelLayerLocation)
and pass it to the constructor forSkullModel
.
-