Package net.minecraftforge.client.event
Class EntityRenderersEvent.CreateSkullModels
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.EntityRenderersEvent
net.minecraftforge.client.event.EntityRenderersEvent.CreateSkullModels
- All Implemented Interfaces:
IModBusEvent
- Enclosing class:
- EntityRenderersEvent
Provides a safe place to register models for the skull block
-
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
-
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 TypeMethodDescriptionvoid
registerSkullModel
(SkullBlock.Type type, SkullModelBase model) Registers the constructor for a skull block with the givenSkullBlock.Type
.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
builder
private final com.google.common.collect.ImmutableMap.Builder<SkullBlock.Type,SkullModelBase> builder -
entityModelSet
-
-
Constructor Details
-
CreateSkullModels
public CreateSkullModels(com.google.common.collect.ImmutableMap.Builder<SkullBlock.Type, SkullModelBase> builder, EntityModelSet entityModelSet)
-
-
Method Details
-
getEntityModelSet
-
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 appropiate time.- Parameters:
type
- Unique skull type. Will cause an exception if multiple mods (including vanilla) register models for the same typemodel
- Model instance. A typical implementation will simply donew SkullModel(entityModelSet.bakeLayer(layerLocation))
-