Class EntityAttributeModificationEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityAttributeModificationEvent
- All Implemented Interfaces:
net.neoforged.fml.event.IModBusEvent
public class EntityAttributeModificationEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.fml.event.IModBusEvent
EntityAttributeModificationEvent.
Use this event to add attributes to existing entity types. This event is fired after registration and before common setup, and after
Fired on the Mod bus
Use this event to add attributes to existing entity types. This event is fired after registration and before common setup, and after
EntityAttributeCreationEvent
Fired on the Mod bus
IModBusEvent
.-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map
<EntityType<? extends LivingEntity>, AttributeSupplier.Builder> private final List
<EntityType<? extends LivingEntity>> -
Constructor Summary
ConstructorDescriptionEntityAttributeModificationEvent
(Map<EntityType<? extends LivingEntity>, AttributeSupplier.Builder> mapIn) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(EntityType<? extends LivingEntity> entityType, Holder<Attribute> attribute) void
add
(EntityType<? extends LivingEntity> entityType, Holder<Attribute> attribute, double value) List
<EntityType<? extends LivingEntity>> getTypes()
boolean
has
(EntityType<? extends LivingEntity> entityType, Holder<Attribute> attribute)
-
Field Details
-
entityAttributes
-
entityTypes
-
-
Constructor Details
-
EntityAttributeModificationEvent
public EntityAttributeModificationEvent(Map<EntityType<? extends LivingEntity>, AttributeSupplier.Builder> mapIn)
-
-
Method Details
-
add
public void add(EntityType<? extends LivingEntity> entityType, Holder<Attribute> attribute, double value) -
add
-
has
-
getTypes
-