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.
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.
-
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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreateSkullModels
(Map<net.minecraft.world.level.block.SkullBlock.Type, Function<net.minecraft.client.model.geom.EntityModelSet, net.minecraft.client.model.SkullModelBase>> skullModels) -
Method Summary
Modifier and TypeMethodDescriptionvoid
registerSkullModel
(net.minecraft.world.level.block.SkullBlock.Type type, Function<net.minecraft.client.model.geom.EntityModelSet, net.minecraft.client.model.SkullModelBase> factory) Registers the entity model for a skull block with the givenSkullBlock.Type
.void
registerSkullModel
(net.minecraft.world.level.block.SkullBlock.Type type, net.minecraft.client.model.geom.ModelLayerLocation layerLocation) Registers aSkullModel
for a skull block with the givenSkullBlock.Type
.void
registerSkullModel
(net.minecraft.world.level.block.SkullBlock.Type type, net.minecraft.client.model.geom.ModelLayerLocation layerLocation, Function<net.minecraft.client.model.geom.ModelPart, net.minecraft.client.model.SkullModelBase> factory) Registers the entity model for a skull block with the givenSkullBlock.Type
.
-
Field Details
-
skullModels
-
-
Constructor Details
-
CreateSkullModels
-
-
Method Details
-
registerSkullModel
public void registerSkullModel(net.minecraft.world.level.block.SkullBlock.Type type, net.minecraft.client.model.geom.ModelLayerLocation layerLocation) Registers aSkullModel
for a skull block with the givenSkullBlock.Type
.- Parameters:
type
- a unique skull type; an exception will be thrown if multiple mods register models for the same type or a mod tries to register a model for a vanilla typelayerLocation
- the key that identifies theLayerDefinition
used by the model
-
registerSkullModel
public void registerSkullModel(net.minecraft.world.level.block.SkullBlock.Type type, net.minecraft.client.model.geom.ModelLayerLocation layerLocation, Function<net.minecraft.client.model.geom.ModelPart, net.minecraft.client.model.SkullModelBase> factory) Registers the entity model for a skull block with the givenSkullBlock.Type
.- Parameters:
type
- a unique skull type; an exception will be thrown if multiple mods register models for the same type or a mod tries to register a model for a vanilla typelayerLocation
- the key that identifies theLayerDefinition
used by the modelfactory
- the factory to create the skull model instance, taking in the rootModelPart
and returning the model.
-
registerSkullModel
public void registerSkullModel(net.minecraft.world.level.block.SkullBlock.Type type, Function<net.minecraft.client.model.geom.EntityModelSet, net.minecraft.client.model.SkullModelBase> factory) Registers the entity model for a skull block with the givenSkullBlock.Type
.- Parameters:
type
- a unique skull type; an exception will be thrown if multiple mods register models for the same type or a mod tries to register a model for a vanilla typefactory
- the factory to create the skull model instance. A typical implementation will simply bake a model usingEntityModelSet.bakeLayer(ModelLayerLocation)
and pass it to the constructor forSkullModel
-