net.minecraft.enchantment.effect

public record AttributeEnchantmentEffect

implements EnchantmentLocationBasedEffect

net.minecraft.world.item.enchantment.effects.EnchantmentAttributeEffect
net.minecraft.world.item.enchantment.effects.EnchantmentAttributeEffect
net.minecraft.class_9720
net.minecraft.enchantment.effect.AttributeEnchantmentEffect

Field summary

Modifier and TypeField
private final Identifier
id
id
comp_2839
id
private final RegistryEntry<EntityAttribute>
attribute
attribute
comp_2718
attribute
private final EnchantmentLevelBasedValue
amount
amount
comp_2719
amount
private final EntityAttributeModifier$Operation
operation
operation
comp_2720
operation
public static final com.mojang.serialization.MapCodec<AttributeEnchantmentEffect>
MAP_CODEC
MAP_CODEC
field_51706
CODEC

Constructor summary

ModifierConstructor
public (Identifier id, RegistryEntry<EntityAttribute> attribute, EnchantmentLevelBasedValue amount, EntityAttributeModifier$Operation operation)

Method summary

Modifier and TypeMethod
private Identifier
idForSlot(StringRepresentable slot)
idForSlot(StringRepresentable slot)
method_60769(class_3542 arg0)
getModifierId(StringIdentifiable suffix)
public EntityAttributeModifier
getModifier(int level, StringRepresentable slot)
getModifier(int level, StringRepresentable slot)
method_60228(int arg0, class_3542 arg1)
createAttributeModifier(int value, StringIdentifiable suffix)
public void
onChangedBlock(ServerLevel serverLevel, int enchantmentLevel, EnchantedItemInUse item, Entity entity, Vec3 position, boolean becameActive)
onChangedBlock(ServerLevel serverLevel, int enchantmentLevel, EnchantedItemInUse item, Entity entity, Vec3 position, boolean becameActive)
method_60221(class_3218 arg0, int arg1, class_9699 arg2, class_1297 arg3, class_243 arg4, boolean arg5)
apply(ServerWorld arg0, int arg1, EnchantmentEffectContext arg2, Entity arg3, Vec3d arg4, boolean arg5)
public void
onDeactivated(EnchantedItemInUse item, Entity entity, Vec3 position, int level)
onDeactivated(EnchantedItemInUse item, Entity entity, Vec3 position, int level)
method_60222(class_9699 arg0, class_1297 arg1, class_243 arg2, int arg3)
remove(EnchantmentEffectContext arg0, Entity arg1, Vec3d arg2, int arg3)
private com.google.common.collect.HashMultimap<RegistryEntry<EntityAttribute>, EntityAttributeModifier>
makeAttributeMap(int enchantmentLevel, EquipmentSlot slot)
makeAttributeMap(int enchantmentLevel, EquipmentSlot slot)
method_60230(int arg0, class_1304 arg1)
getModifiers(int level, EquipmentSlot slot)
public com.mojang.serialization.MapCodec<AttributeEnchantmentEffect>
codec()
codec()
method_60219()
getCodec()
public Identifier
id()
id()
comp_2839()
id()
public RegistryEntry<EntityAttribute>
attribute()
attribute()
comp_2718()
attribute()
public EnchantmentLevelBasedValue
amount()
amount()
comp_2719()
amount()
public EntityAttributeModifier$Operation
operation()
operation()
comp_2720()
operation()