类 EntityAttributeModificationEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityAttributeModificationEvent
- 所有已实现的接口:
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
.-
字段概要
字段修饰符和类型字段说明private final Map
<EntityType<? extends LivingEntity>, AttributeSupplier.Builder> private final List
<EntityType<? extends LivingEntity>> -
构造器概要
构造器构造器说明EntityAttributeModificationEvent
(Map<EntityType<? extends LivingEntity>, AttributeSupplier.Builder> mapIn) -
方法概要
修饰符和类型方法说明void
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)
-
字段详细资料
-
entityAttributes
-
entityTypes
-
-
构造器详细资料
-
EntityAttributeModificationEvent
public EntityAttributeModificationEvent(Map<EntityType<? extends LivingEntity>, AttributeSupplier.Builder> mapIn)
-
-
方法详细资料
-
add
public void add(EntityType<? extends LivingEntity> entityType, Holder<Attribute> attribute, double value) -
add
-
has
-
getTypes
-