kotlin
class EntityTypeModificationConfig(val entityId: Identifier)用于修改现有 EntityType 默认属性的配置对象(原版或模组添加的实体都适用)。 它的属性面与 [top.katton.registry.KattonEntityProperties] 对应,但作用对象是已经注册的实体类型, 并通过 [top.katton.registry.DefaultAttributesHelper] 生效。
属性
| 属性 | 说明 |
|---|---|
entityId | 要修改的实体类型标识符。 |
EntityTypeModificationConfig.attribute
kotlin
fun attribute(attribute: Holder<Attribute>, value: Double): EntityTypeModificationConfig覆盖任意属性的基础值。
EntityTypeModificationConfig.maxHealth
kotlin
fun maxHealth(value: Double): EntityTypeModificationConfig覆盖最大生命值(generic.max_health)。
EntityTypeModificationConfig.movementSpeed
kotlin
fun movementSpeed(value: Double): EntityTypeModificationConfig覆盖移动速度(generic.movement_speed)。
EntityTypeModificationConfig.knockbackResistance
kotlin
fun knockbackResistance(value: Double): EntityTypeModificationConfig覆盖击退抗性(generic.knockback_resistance)。
EntityTypeModificationConfig.attackDamage
kotlin
fun attackDamage(value: Double): EntityTypeModificationConfig覆盖攻击伤害(generic.attack_damage)。
EntityTypeModificationConfig.attackSpeed
kotlin
fun attackSpeed(value: Double): EntityTypeModificationConfig覆盖攻击速度(generic.attack_speed)。
EntityTypeModificationConfig.armor
kotlin
fun armor(value: Double): EntityTypeModificationConfig覆盖护甲(generic.armor)。
EntityTypeModificationConfig.armorToughness
kotlin
fun armorToughness(value: Double): EntityTypeModificationConfig覆盖护甲韧性(generic.armor_toughness)。
EntityTypeModificationConfig.followRange
kotlin
fun followRange(value: Double): EntityTypeModificationConfig覆盖追踪范围(generic.follow_range)。
EntityTypeModificationConfig.luck
kotlin
fun luck(value: Double): EntityTypeModificationConfig覆盖幸运值(generic.luck)。
