Uses of Record Class
net.minecraft.world.entity.ai.attributes.AttributeModifier
Packages that use AttributeModifier
Package
Description
-
Uses of AttributeModifier in net.minecraft.network.protocol.game
Fields in net.minecraft.network.protocol.game with type parameters of type AttributeModifierModifier and TypeFieldDescriptionstatic final StreamCodec
<io.netty.buffer.ByteBuf, AttributeModifier> ClientboundUpdateAttributesPacket.AttributeSnapshot.MODIFIER_STREAM_CODEC
private final Collection
<AttributeModifier> ClientboundUpdateAttributesPacket.AttributeSnapshot.modifiers
The field for themodifiers
record component.Methods in net.minecraft.network.protocol.game that return types with arguments of type AttributeModifierModifier and TypeMethodDescriptionClientboundUpdateAttributesPacket.AttributeSnapshot.modifiers()
Returns the value of themodifiers
record component.Constructor parameters in net.minecraft.network.protocol.game with type arguments of type AttributeModifierModifierConstructorDescriptionAttributeSnapshot
(Holder<Attribute> attribute, double base, Collection<AttributeModifier> modifiers) Creates an instance of aAttributeSnapshot
record class. -
Uses of AttributeModifier in net.minecraft.server.level
Fields in net.minecraft.server.level declared as AttributeModifierModifier and TypeFieldDescriptionprivate static final AttributeModifier
ServerPlayer.CREATIVE_BLOCK_INTERACTION_RANGE_MODIFIER
private static final AttributeModifier
ServerPlayer.CREATIVE_ENTITY_INTERACTION_RANGE_MODIFIER
-
Uses of AttributeModifier in net.minecraft.world.effect
Methods in net.minecraft.world.effect that return AttributeModifierMethod parameters in net.minecraft.world.effect with type arguments of type AttributeModifierModifier and TypeMethodDescriptionvoid
MobEffect.createModifiers
(int p_316803_, BiConsumer<Holder<Attribute>, AttributeModifier> p_316902_) -
Uses of AttributeModifier in net.minecraft.world.entity
Fields in net.minecraft.world.entity declared as AttributeModifierModifier and TypeFieldDescriptionprivate static final AttributeModifier
LivingEntity.SPEED_MODIFIER_SPRINTING
-
Uses of AttributeModifier in net.minecraft.world.entity.ai.attributes
Fields in net.minecraft.world.entity.ai.attributes with type parameters of type AttributeModifierModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<AttributeModifier> AttributeModifier.CODEC
static final com.mojang.serialization.MapCodec
<AttributeModifier> AttributeModifier.MAP_CODEC
private final Map
<ResourceLocation, AttributeModifier> AttributeInstance.modifierById
private final Map
<AttributeModifier.Operation, Map<ResourceLocation, AttributeModifier>> AttributeInstance.modifiersByOperation
private final Map
<ResourceLocation, AttributeModifier> AttributeInstance.permanentModifiers
static final StreamCodec
<io.netty.buffer.ByteBuf, AttributeModifier> AttributeModifier.STREAM_CODEC
Methods in net.minecraft.world.entity.ai.attributes that return AttributeModifierModifier and TypeMethodDescriptionAttributeInstance.getModifier
(ResourceLocation p_351007_) static AttributeModifier
AttributeModifier.load
(CompoundTag p_22213_) Methods in net.minecraft.world.entity.ai.attributes that return types with arguments of type AttributeModifierModifier and TypeMethodDescriptionAttributeInstance.getModifiers()
(package private) Map
<ResourceLocation, AttributeModifier> AttributeInstance.getModifiers
(AttributeModifier.Operation p_22105_) private Collection
<AttributeModifier> AttributeInstance.getModifiersOrEmpty
(AttributeModifier.Operation p_22117_) Methods in net.minecraft.world.entity.ai.attributes with parameters of type AttributeModifierModifier and TypeMethodDescriptionprivate void
AttributeInstance.addModifier
(AttributeModifier p_22134_) void
AttributeInstance.addOrReplacePermanentModifier
(AttributeModifier p_353041_) void
AttributeInstance.addOrUpdateTransientModifier
(AttributeModifier p_316482_) void
AttributeInstance.addPermanentModifier
(AttributeModifier p_22126_) void
AttributeInstance.addTransientModifier
(AttributeModifier p_22119_) void
AttributeInstance.removeModifier
(AttributeModifier p_22131_) Method parameters in net.minecraft.world.entity.ai.attributes with type arguments of type AttributeModifierModifier and TypeMethodDescriptionvoid
AttributeMap.addTransientAttributeModifiers
(com.google.common.collect.Multimap<Holder<Attribute>, AttributeModifier> p_345244_) void
AttributeMap.removeAttributeModifiers
(com.google.common.collect.Multimap<Holder<Attribute>, AttributeModifier> p_344776_) -
Uses of AttributeModifier in net.minecraft.world.entity.monster
Fields in net.minecraft.world.entity.monster declared as AttributeModifierModifier and TypeFieldDescriptionprivate static final AttributeModifier
Shulker.COVERED_ARMOR_MODIFIER
private static final AttributeModifier
EnderMan.SPEED_MODIFIER_ATTACKING
private static final AttributeModifier
ZombifiedPiglin.SPEED_MODIFIER_ATTACKING
private static final AttributeModifier
Zombie.SPEED_MODIFIER_BABY
private static final AttributeModifier
Witch.SPEED_MODIFIER_DRINKING
private static final AttributeModifier
Strider.SUFFOCATING_MODIFIER
private static final AttributeModifier
-
Uses of AttributeModifier in net.minecraft.world.entity.monster.piglin
Fields in net.minecraft.world.entity.monster.piglin declared as AttributeModifierModifier and TypeFieldDescriptionprivate static final AttributeModifier
Piglin.SPEED_MODIFIER_BABY
-
Uses of AttributeModifier in net.minecraft.world.item
Methods in net.minecraft.world.item with parameters of type AttributeModifierModifier and TypeMethodDescriptionprivate void
ItemStack.addModifierTooltip
(Consumer<Component> p_331062_, Player p_330317_, Holder<Attribute> p_330626_, AttributeModifier p_331252_) Method parameters in net.minecraft.world.item with type arguments of type AttributeModifierModifier and TypeMethodDescriptionvoid
ItemStack.forEachModifier
(EquipmentSlotGroup p_348610_, BiConsumer<Holder<Attribute>, AttributeModifier> p_348516_) void
ItemStack.forEachModifier
(EquipmentSlot p_332001_, BiConsumer<Holder<Attribute>, AttributeModifier> p_330882_) -
Uses of AttributeModifier in net.minecraft.world.item.component
Fields in net.minecraft.world.item.component declared as AttributeModifierModifier and TypeFieldDescriptionprivate final AttributeModifier
ItemAttributeModifiers.Entry.modifier
The field for themodifier
record component.Methods in net.minecraft.world.item.component that return AttributeModifierModifier and TypeMethodDescriptionItemAttributeModifiers.Entry.modifier()
Returns the value of themodifier
record component.Methods in net.minecraft.world.item.component with parameters of type AttributeModifierModifier and TypeMethodDescriptionItemAttributeModifiers.Builder.add
(Holder<Attribute> p_330324_, AttributeModifier p_331766_, EquipmentSlotGroup p_331205_) ItemAttributeModifiers.withModifierAdded
(Holder<Attribute> p_330266_, AttributeModifier p_331954_, EquipmentSlotGroup p_332175_) Method parameters in net.minecraft.world.item.component with type arguments of type AttributeModifierModifier and TypeMethodDescriptionvoid
ItemAttributeModifiers.forEach
(EquipmentSlotGroup p_348576_, BiConsumer<Holder<Attribute>, AttributeModifier> p_348660_) void
ItemAttributeModifiers.forEach
(EquipmentSlot p_332158_, BiConsumer<Holder<Attribute>, AttributeModifier> p_331684_) Constructors in net.minecraft.world.item.component with parameters of type AttributeModifierModifierConstructorDescriptionEntry
(Holder<Attribute> attribute, AttributeModifier modifier, EquipmentSlotGroup slot) Creates an instance of aEntry
record class. -
Uses of AttributeModifier in net.minecraft.world.item.enchantment
Method parameters in net.minecraft.world.item.enchantment with type arguments of type AttributeModifierModifier and TypeMethodDescriptionstatic void
EnchantmentHelper.forEachModifier
(ItemStack p_348634_, EquipmentSlotGroup p_348528_, BiConsumer<Holder<Attribute>, AttributeModifier> p_348554_) static void
EnchantmentHelper.forEachModifier
(ItemStack p_345685_, EquipmentSlot p_345123_, BiConsumer<Holder<Attribute>, AttributeModifier> p_345061_) -
Uses of AttributeModifier in net.minecraft.world.item.enchantment.effects
Methods in net.minecraft.world.item.enchantment.effects that return AttributeModifierModifier and TypeMethodDescriptionEnchantmentAttributeEffect.getModifier
(int p_345225_, StringRepresentable p_350734_) Methods in net.minecraft.world.item.enchantment.effects that return types with arguments of type AttributeModifierModifier and TypeMethodDescriptionprivate com.google.common.collect.HashMultimap
<Holder<Attribute>, AttributeModifier> EnchantmentAttributeEffect.makeAttributeMap
(int p_346033_, EquipmentSlot p_350290_) -
Uses of AttributeModifier in net.neoforged.neoforge.common
Methods in net.neoforged.neoforge.common with parameters of type AttributeModifierModifier and TypeMethodDescriptionBooleanAttribute.toComponent
(AttributeModifier modif, TooltipFlag flag) -
Uses of AttributeModifier in net.neoforged.neoforge.common.extensions
Methods in net.neoforged.neoforge.common.extensions with parameters of type AttributeModifierModifier and TypeMethodDescriptiondefault Component
IAttributeExtension.getDebugInfo
(AttributeModifier modif, TooltipFlag flag) Computes the additional debug information for a given attribute modifier, if the flag is advanced.default MutableComponent
IAttributeExtension.toComponent
(AttributeModifier modif, TooltipFlag flag) Converts an attribute modifier into its tooltip representation. -
Uses of AttributeModifier in net.neoforged.neoforge.common.util
Fields in net.neoforged.neoforge.common.util declared as AttributeModifierModifier and TypeFieldDescriptionprivate final AttributeModifier
AttributeUtil.BaseModifier.base
The field for thebase
record component.Fields in net.neoforged.neoforge.common.util with type parameters of type AttributeModifierModifier and TypeFieldDescriptionstatic final Comparator
<AttributeModifier> AttributeUtil.ATTRIBUTE_MODIFIER_COMPARATOR
Comparator forAttributeModifier
.private final List
<AttributeModifier> AttributeUtil.BaseModifier.children
The field for thechildren
record component.private List
<AttributeModifier> AttributeUtil.MergedModifierData.children
Methods in net.neoforged.neoforge.common.util that return AttributeModifierModifier and TypeMethodDescriptionAttributeUtil.BaseModifier.base()
Returns the value of thebase
record component.Methods in net.neoforged.neoforge.common.util that return types with arguments of type AttributeModifierModifier and TypeMethodDescriptionAttributeUtil.BaseModifier.children()
Returns the value of thechildren
record component.static com.google.common.collect.Multimap
<Holder<Attribute>, AttributeModifier> AttributeUtil.getSortedModifiers
(ItemStack stack, EquipmentSlotGroup slot) Returns a sorted, mutableMultimap
containing all the attribute modifiers on an item stack for the given group.static com.google.common.collect.Multimap
<Holder<Attribute>, AttributeModifier> AttributeUtil.sortedMap()
Creates a sortedTreeMultimap
used to ensure a stable iteration order of item attribute modifiers.Method parameters in net.neoforged.neoforge.common.util with type arguments of type AttributeModifierModifier and TypeMethodDescriptionstatic void
AttributeUtil.addPotionTooltip
(List<com.mojang.datafixers.util.Pair<Holder<Attribute>, AttributeModifier>> list, Consumer<Component> tooltips) Adds tooltip lines for the attribute modifiers contained in aPotionContents
.static void
AttributeUtil.applyTextFor
(ItemStack stack, Consumer<Component> tooltip, com.google.common.collect.Multimap<Holder<Attribute>, AttributeModifier> modifierMap, AttributeTooltipContext ctx) Applies the text for the provided attribute modifiers to the tooltip for a given item stack.Constructors in net.neoforged.neoforge.common.util with parameters of type AttributeModifierModifierConstructorDescriptionprivate
BaseModifier
(AttributeModifier base, List<AttributeModifier> children) Creates an instance of aBaseModifier
record class.Constructor parameters in net.neoforged.neoforge.common.util with type arguments of type AttributeModifierModifierConstructorDescriptionprivate
BaseModifier
(AttributeModifier base, List<AttributeModifier> children) Creates an instance of aBaseModifier
record class. -
Uses of AttributeModifier in net.neoforged.neoforge.event
Methods in net.neoforged.neoforge.event with parameters of type AttributeModifierModifier and TypeMethodDescriptionboolean
ItemAttributeModifierEvent.addModifier
(Holder<Attribute> attribute, AttributeModifier modifier, EquipmentSlotGroup slot) Adds a new attribute modifier to the given stack.(package private) boolean
ItemAttributeModifierEvent.ItemAttributeModifiersBuilder.addModifier
(Holder<Attribute> attribute, AttributeModifier modifier, EquipmentSlotGroup slot) Attempts to add a new modifier, refusing if one is already present with the same id.(package private) ItemAttributeModifiers.Entry
ItemAttributeModifierEvent.ItemAttributeModifiersBuilder.replaceModifier
(Holder<Attribute> attribute, AttributeModifier modifier, EquipmentSlotGroup slot) Adds a modifier to the list, replacing any existing modifiers with the same id.void
ItemAttributeModifierEvent.replaceModifier
(Holder<Attribute> attribute, AttributeModifier modifier, EquipmentSlotGroup slot) Adds a new attribute modifier to the given stack, optionally replacing any existing modifiers with the same id.