Package net.minecraftforge.event.entity
Class EntityAttributeModificationEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.entity.EntityAttributeModificationEvent
-
- All Implemented Interfaces:
IModBusEvent
public class EntityAttributeModificationEvent extends net.minecraftforge.eventbus.api.Event implements IModBusEvent
EntityAttributeModificationEvent.
Use this event to add attributes to existing entity types. This event is fired after registration and before common setup, and afterEntityAttributeCreationEvent
Fired on the Mod busIModBusEvent
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<EntityType<? extends LivingEntity>,AttributeModifierMap.MutableAttribute>
entityAttributes
private java.util.List<EntityType<? extends LivingEntity>>
entityTypes
-
Constructor Summary
Constructors Constructor Description EntityAttributeModificationEvent(java.util.Map<EntityType<? extends LivingEntity>,AttributeModifierMap.MutableAttribute> mapIn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(EntityType<? extends LivingEntity> entityType, Attribute attribute)
void
add(EntityType<? extends LivingEntity> entityType, Attribute attribute, double value)
java.util.List<EntityType<? extends LivingEntity>>
getTypes()
boolean
has(EntityType<? extends LivingEntity> entityType, Attribute attribute)
-
-
-
Field Detail
-
entityAttributes
private final java.util.Map<EntityType<? extends LivingEntity>,AttributeModifierMap.MutableAttribute> entityAttributes
-
entityTypes
private final java.util.List<EntityType<? extends LivingEntity>> entityTypes
-
-
Constructor Detail
-
EntityAttributeModificationEvent
public EntityAttributeModificationEvent(java.util.Map<EntityType<? extends LivingEntity>,AttributeModifierMap.MutableAttribute> mapIn)
-
-
Method Detail
-
add
public void add(EntityType<? extends LivingEntity> entityType, Attribute attribute, double value)
-
add
public void add(EntityType<? extends LivingEntity> entityType, Attribute attribute)
-
has
public boolean has(EntityType<? extends LivingEntity> entityType, Attribute attribute)
-
getTypes
public java.util.List<EntityType<? extends LivingEntity>> getTypes()
-
-