Uses of Class
net.minecraft.world.entity.ai.attributes.Attribute
Packages that use Attribute
Package
Description
-
Uses of Attribute in net.minecraft.commands.arguments
Methods in net.minecraft.commands.arguments that return types with arguments of type AttributeModifier and TypeMethodDescriptionstatic Holder.Reference
<Attribute> ResourceArgument.getAttribute
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_248753_, String p_251157_) -
Uses of Attribute in net.minecraft.core.component.predicates
Fields in net.minecraft.core.component.predicates with type parameters of type AttributeModifier and TypeFieldDescriptionAttributeModifiersPredicate.EntryPredicate.attribute
The field for theattribute
record component.Methods in net.minecraft.core.component.predicates that return types with arguments of type AttributeModifier and TypeMethodDescriptionAttributeModifiersPredicate.EntryPredicate.attribute()
Returns the value of theattribute
record component.Constructor parameters in net.minecraft.core.component.predicates with type arguments of type AttributeModifierConstructorDescriptionEntryPredicate
(Optional<HolderSet<Attribute>> attribute, Optional<ResourceLocation> id, MinMaxBounds.Doubles amount, Optional<AttributeModifier.Operation> operation, Optional<EquipmentSlotGroup> slot) Creates an instance of aEntryPredicate
record class. -
Uses of Attribute in net.minecraft.core.registries
Fields in net.minecraft.core.registries with type parameters of type Attribute -
Uses of Attribute in net.minecraft.network.protocol.game
Fields in net.minecraft.network.protocol.game with type parameters of type AttributeModifier and TypeFieldDescriptionClientboundUpdateAttributesPacket.AttributeSnapshot.attribute
The field for theattribute
record component.Methods in net.minecraft.network.protocol.game that return types with arguments of type AttributeModifier and TypeMethodDescriptionClientboundUpdateAttributesPacket.AttributeSnapshot.attribute()
Returns the value of theattribute
record component.Constructor parameters in net.minecraft.network.protocol.game with type arguments of type AttributeModifierConstructorDescriptionAttributeSnapshot
(Holder<Attribute> attribute, double base, Collection<AttributeModifier> modifiers) Creates an instance of aAttributeSnapshot
record class. -
Uses of Attribute in net.minecraft.server.commands
Method parameters in net.minecraft.server.commands with type arguments of type AttributeModifier and TypeMethodDescriptionprivate static int
AttributeCommand.addModifier
(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, ResourceLocation pId, double pAmount, AttributeModifier.Operation pOperation) private static int
AttributeCommand.getAttributeBase
(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, double pScale) private static Component
AttributeCommand.getAttributeDescription
(Holder<Attribute> pAttribute) private static AttributeInstance
AttributeCommand.getAttributeInstance
(Entity pEntity, Holder<Attribute> pAttribute) private static int
AttributeCommand.getAttributeModifier
(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, ResourceLocation pId, double pScale) private static Stream
<ResourceLocation> AttributeCommand.getAttributeModifiers
(Entity pEntity, Holder<Attribute> pAttribute) private static int
AttributeCommand.getAttributeValue
(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, double pScale) private static LivingEntity
AttributeCommand.getEntityWithAttribute
(Entity pEntity, Holder<Attribute> pAttribute) private static int
AttributeCommand.removeModifier
(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, ResourceLocation pId) private static int
AttributeCommand.resetAttributeBase
(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute) private static int
AttributeCommand.setAttributeBase
(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, double pValue) -
Uses of Attribute in net.minecraft.server.level
Method parameters in net.minecraft.server.level with type arguments of type AttributeModifier and TypeMethodDescriptionprotected void
ServerPlayer.onAttributeUpdated
(Holder<Attribute> pAttribute) -
Uses of Attribute in net.minecraft.world.effect
Fields in net.minecraft.world.effect with type parameters of type AttributeModifier and TypeFieldDescriptionprivate final Map
<Holder<Attribute>, MobEffect.AttributeTemplate> MobEffect.attributeModifiers
Contains a Map of the AttributeModifiers registered by potionsMethod parameters in net.minecraft.world.effect with type arguments of type AttributeModifier and TypeMethodDescriptionMobEffect.addAttributeModifier
(Holder<Attribute> pAttribute, ResourceLocation pId, double pAmount, AttributeModifier.Operation pOperation) MobEffect.addAttributeModifier
(Holder<Attribute> attribute, ResourceLocation id, AttributeModifier.Operation operation, it.unimi.dsi.fastutil.ints.Int2DoubleFunction curve) Neo: attribute template with custom level curve, for mob effects providing non-linear attribute modifiers.void
MobEffect.createModifiers
(int pAmplifier, BiConsumer<Holder<Attribute>, AttributeModifier> pOutput) -
Uses of Attribute in net.minecraft.world.entity
Method parameters in net.minecraft.world.entity with type arguments of type AttributeModifier and TypeMethodDescriptionprivate double
Mob.getApproximateAttributeWith
(ItemStack pItem, Holder<Attribute> pAttribute, EquipmentSlot pSlot) LivingEntity.getAttribute
(Holder<Attribute> pAttribute) double
LivingEntity.getAttributeBaseValue
(Holder<Attribute> pAttribute) double
LivingEntity.getAttributeValue
(Holder<Attribute> pAttribute) protected void
LivingEntity.onAttributeUpdated
(Holder<Attribute> pAttribute) protected void
Mob.onAttributeUpdated
(Holder<Attribute> pAttribute) -
Uses of Attribute in net.minecraft.world.entity.ai.attributes
Subclasses of Attribute in net.minecraft.world.entity.ai.attributesModifier and TypeClassDescriptionclass
Defines an entity attribute that is limited to a range of values.Fields in net.minecraft.world.entity.ai.attributes with type parameters of type AttributeModifier and TypeFieldDescriptionAttributes.ARMOR
Handles the armor points for an entity.Attributes.ARMOR_TOUGHNESS
Handles the amount of damage mitigated by wearing armor.Attributes.ATTACK_DAMAGE
Handles the attack damage inflicted by entities.Attributes.ATTACK_KNOCKBACK
Handles additional horizontal knockback when damaging another entity.Attributes.ATTACK_SPEED
Handles the cooldown rate when attacking with an item.AttributeInstance.attribute
The Attribute this is an instance ofAttributeInstance.Packed.attribute
The field for theattribute
record component.private final Map
<Holder<Attribute>, AttributeInstance> AttributeMap.attributes
Attributes.BLOCK_BREAK_SPEED
Attributes.BLOCK_INTERACTION_RANGE
private final Map
<Holder<Attribute>, AttributeInstance> AttributeSupplier.Builder.builder
Attributes.BURNING_TIME
Attributes.CAMERA_DISTANCE
Attribute.CODEC
Attributes.ENTITY_INTERACTION_RANGE
Attributes.EXPLOSION_KNOCKBACK_RESISTANCE
Attributes.FALL_DAMAGE_MULTIPLIER
Attributes.FLYING_SPEED
Handles the movement speed of flying entities such as parrots and bees.Attributes.FOLLOW_RANGE
Handles the range in blocks that a mob will notice and track players and other potential targets.Attributes.GRAVITY
private final Map
<Holder<Attribute>, AttributeInstance> AttributeSupplier.instances
Attributes.JUMP_STRENGTH
Handles the jump strength for horses.Attributes.KNOCKBACK_RESISTANCE
Handles the reduction of horizontal knockback when damaged by attacks or projectiles.Attributes.LUCK
Handles luck when a player generates loot from a loot table.Attributes.MAX_ABSORPTION
Attributes.MAX_HEALTH
Handles the maximum health of an entity.Attributes.MINING_EFFICIENCY
Attributes.MOVEMENT_EFFICIENCY
Attributes.MOVEMENT_SPEED
Handles the movement speed of entities.Attributes.OXYGEN_BONUS
Attributes.SAFE_FALL_DISTANCE
Attributes.SCALE
Attributes.SNEAKING_SPEED
Attributes.SPAWN_REINFORCEMENTS_CHANCE
Handles the chance for a zombie to summon reinforcements when attacked.Attributes.STEP_HEIGHT
static final StreamCodec
<RegistryFriendlyByteBuf, Holder<Attribute>> Attribute.STREAM_CODEC
Attributes.SUBMERGED_MINING_SPEED
Attributes.SWEEPING_DAMAGE_RATIO
Attributes.TEMPT_RANGE
Attributes.WATER_MOVEMENT_EFFICIENCY
Attributes.WAYPOINT_RECEIVE_RANGE
Attributes.WAYPOINT_TRANSMIT_RANGE
Methods in net.minecraft.world.entity.ai.attributes that return AttributeModifier and TypeMethodDescriptionAttribute.setSentiment
(Attribute.Sentiment pSentiment) Attribute.setSyncable
(boolean pWatch) Sets whether the attribute value should be synced to the client.Methods in net.minecraft.world.entity.ai.attributes that return types with arguments of type AttributeModifier and TypeMethodDescriptionAttributeInstance.Packed.attribute()
Returns the value of theattribute
record component.AttributeInstance.getAttribute()
Methods in net.minecraft.world.entity.ai.attributes with parameters of type AttributeModifier and TypeMethodDescriptionMethod parameters in net.minecraft.world.entity.ai.attributes with type arguments of type AttributeModifier and TypeMethodDescriptionvoid
AttributeMap.addTransientAttributeModifiers
(com.google.common.collect.Multimap<Holder<Attribute>, AttributeModifier> p_345244_) private AttributeInstance
AttributeSupplier.createInstance
(Consumer<AttributeInstance> pOnDirty, Holder<Attribute> pAttribute) private AttributeInstance
AttributeSupplier.getAttributeInstance
(Holder<Attribute> pAttribute) double
AttributeMap.getBaseValue
(Holder<Attribute> pAttribute) double
AttributeSupplier.getBaseValue
(Holder<Attribute> pAttribute) AttributeMap.getInstance
(Holder<Attribute> pAttribute) double
AttributeMap.getModifierValue
(Holder<Attribute> pAttribute, ResourceLocation pId) double
AttributeSupplier.getModifierValue
(Holder<Attribute> pAttribute, ResourceLocation pId) double
double
boolean
AttributeMap.hasAttribute
(Holder<Attribute> pAttribute) boolean
AttributeSupplier.Builder.hasAttribute
(Holder<Attribute> attribute) boolean
AttributeSupplier.hasAttribute
(Holder<Attribute> pAttribute) boolean
AttributeMap.hasModifier
(Holder<Attribute> pAttribute, ResourceLocation pId) boolean
AttributeSupplier.hasModifier
(Holder<Attribute> pAttribute, ResourceLocation pId) void
AttributeMap.removeAttributeModifiers
(com.google.common.collect.Multimap<Holder<Attribute>, AttributeModifier> p_344776_) boolean
AttributeMap.resetBaseValue
(Holder<Attribute> pAttribute) Constructor parameters in net.minecraft.world.entity.ai.attributes with type arguments of type AttributeModifierConstructorDescriptionAttributeInstance
(Holder<Attribute> pAttribute, Consumer<AttributeInstance> pOnDirty) (package private)
AttributeSupplier
(Map<Holder<Attribute>, AttributeInstance> pInstances) Packed
(Holder<Attribute> attribute, double baseValue, List<AttributeModifier> modifiers) Creates an instance of aPacked
record class. -
Uses of Attribute in net.minecraft.world.entity.animal.horse
Method parameters in net.minecraft.world.entity.animal.horse with type arguments of type AttributeModifier and TypeMethodDescriptionprivate void
AbstractHorse.setOffspringAttribute
(AgeableMob pParent, AbstractHorse pChild, Holder<Attribute> pAttribute, double pMin, double pMax) -
Uses of Attribute in net.minecraft.world.item
Method parameters in net.minecraft.world.item with type arguments of type AttributeModifier and TypeMethodDescriptionvoid
ItemStack.forEachModifier
(EquipmentSlotGroup p_348610_, org.apache.commons.lang3.function.TriConsumer<Holder<Attribute>, AttributeModifier, ItemAttributeModifiers.Display> p_415655_) void
ItemStack.forEachModifier
(EquipmentSlot pEquipmentSLot, BiConsumer<Holder<Attribute>, AttributeModifier> pAction) -
Uses of Attribute in net.minecraft.world.item.component
Fields in net.minecraft.world.item.component with type parameters of type AttributeModifier and TypeFieldDescriptionItemAttributeModifiers.Entry.attribute
The field for theattribute
record component.Methods in net.minecraft.world.item.component that return types with arguments of type AttributeModifier and TypeMethodDescriptionItemAttributeModifiers.Entry.attribute()
Returns the value of theattribute
record component.Method parameters in net.minecraft.world.item.component with type arguments of type AttributeModifier and TypeMethodDescriptionItemAttributeModifiers.Builder.add
(Holder<Attribute> pAttribute, AttributeModifier pModifier, EquipmentSlotGroup pSlot) ItemAttributeModifiers.Builder.add
(Holder<Attribute> pAttribute, AttributeModifier pModifier, EquipmentSlotGroup pSlot, ItemAttributeModifiers.Display pDisplay) void
ItemAttributeModifiers.Display.apply
(Consumer<Component> pOutput, Player pPlayer, Holder<Attribute> pAttribute, AttributeModifier pModifier) void
ItemAttributeModifiers.Display.Default.apply
(Consumer<Component> p_415634_, Player p_415547_, Holder<Attribute> p_416596_, AttributeModifier p_415942_) void
ItemAttributeModifiers.Display.Hidden.apply
(Consumer<Component> p_416397_, Player p_415921_, Holder<Attribute> p_415720_, AttributeModifier p_416314_) void
ItemAttributeModifiers.Display.OverrideText.apply
(Consumer<Component> pOutput, Player pPlayer, Holder<Attribute> pAttribute, AttributeModifier pModifier) void
ItemAttributeModifiers.forEach
(EquipmentSlotGroup pSlotGroup, BiConsumer<Holder<Attribute>, AttributeModifier> pAction) void
ItemAttributeModifiers.forEach
(EquipmentSlotGroup p_416672_, org.apache.commons.lang3.function.TriConsumer<Holder<Attribute>, AttributeModifier, ItemAttributeModifiers.Display> p_416076_) void
ItemAttributeModifiers.forEach
(EquipmentSlot pEquipmentSlot, BiConsumer<Holder<Attribute>, AttributeModifier> pAction) boolean
ItemAttributeModifiers.Entry.matches
(Holder<Attribute> pAttribute, ResourceLocation pId) ItemAttributeModifiers.withModifierAdded
(Holder<Attribute> pAttribute, AttributeModifier pModifier, EquipmentSlotGroup pSlot) Constructor parameters in net.minecraft.world.item.component with type arguments of type AttributeModifierConstructorDescriptionEntry
(Holder<Attribute> p_330366_, AttributeModifier p_332188_, EquipmentSlotGroup p_331685_) Entry
(Holder<Attribute> attribute, AttributeModifier modifier, EquipmentSlotGroup slot, ItemAttributeModifiers.Display display) Creates an instance of aEntry
record class. -
Uses of Attribute in net.minecraft.world.item.enchantment
Method parameters in net.minecraft.world.item.enchantment with type arguments of type AttributeModifier and TypeMethodDescriptionstatic void
EnchantmentHelper.forEachModifier
(ItemStack pStack, EquipmentSlotGroup pSlotGroup, BiConsumer<Holder<Attribute>, AttributeModifier> pAction) static void
EnchantmentHelper.forEachModifier
(ItemStack pStack, EquipmentSlot pSlot, BiConsumer<Holder<Attribute>, AttributeModifier> pAction) -
Uses of Attribute in net.minecraft.world.item.enchantment.effects
Fields in net.minecraft.world.item.enchantment.effects with type parameters of type AttributeModifier and TypeFieldDescriptionEnchantmentAttributeEffect.attribute
The field for theattribute
record component.Methods in net.minecraft.world.item.enchantment.effects that return types with arguments of type AttributeModifier and TypeMethodDescriptionEnchantmentAttributeEffect.attribute()
Returns the value of theattribute
record component.private com.google.common.collect.HashMultimap
<Holder<Attribute>, AttributeModifier> EnchantmentAttributeEffect.makeAttributeMap
(int p_346033_, EquipmentSlot p_350290_) Constructor parameters in net.minecraft.world.item.enchantment.effects with type arguments of type AttributeModifierConstructorDescriptionEnchantmentAttributeEffect
(ResourceLocation id, Holder<Attribute> attribute, LevelBasedValue amount, AttributeModifier.Operation operation) Creates an instance of aEnchantmentAttributeEffect
record class. -
Uses of Attribute in net.minecraft.world.level.storage.loot.functions
Fields in net.minecraft.world.level.storage.loot.functions with type parameters of type AttributeModifier and TypeFieldDescriptionSetAttributesFunction.Modifier.attribute
The field for theattribute
record component.SetAttributesFunction.ModifierBuilder.attribute
Methods in net.minecraft.world.level.storage.loot.functions that return types with arguments of type AttributeModifier and TypeMethodDescriptionSetAttributesFunction.Modifier.attribute()
Returns the value of theattribute
record component.Method parameters in net.minecraft.world.level.storage.loot.functions with type arguments of type AttributeModifier and TypeMethodDescriptionSetAttributesFunction.modifier
(ResourceLocation pId, Holder<Attribute> pAttribute, AttributeModifier.Operation pOperation, NumberProvider pAmount) Constructor parameters in net.minecraft.world.level.storage.loot.functions with type arguments of type AttributeModifierConstructorDescription(package private)
Modifier
(ResourceLocation id, Holder<Attribute> attribute, AttributeModifier.Operation operation, NumberProvider amount, List<EquipmentSlotGroup> slots) Creates an instance of aModifier
record class.ModifierBuilder
(ResourceLocation pId, Holder<Attribute> pAttribute, AttributeModifier.Operation pOperation, NumberProvider pAmount) -
Uses of Attribute in net.neoforged.neoforge.common
Subclasses of Attribute in net.neoforged.neoforge.commonModifier and TypeClassDescriptionclass
A boolean attribute only has two states, on or off, represented by a value of 0 (false) or 1 (true).class
A Percentage Attribute is one which always displays modifiers as percentages, including forAttributeModifier.Operation.ADD_VALUE
.Fields in net.neoforged.neoforge.common with type parameters of type AttributeModifier and TypeFieldDescriptionprivate static final DeferredRegister
<Attribute> NeoForgeMod.ATTRIBUTES
NeoForgeMod.CREATIVE_FLIGHT
This attribute controls if the player may use creative flight when not in creative mode.NeoForgeMod.NAMETAG_DISTANCE
NeoForgeMod.SWIM_SPEED
-
Uses of Attribute in net.neoforged.neoforge.common.extensions
Methods in net.neoforged.neoforge.common.extensions that return Attribute -
Uses of Attribute in net.neoforged.neoforge.common.util
Methods in net.neoforged.neoforge.common.util that return types with arguments of type AttributeModifier and TypeMethodDescriptionstatic 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 AttributeModifier 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. -
Uses of Attribute in net.neoforged.neoforge.event
Fields in net.neoforged.neoforge.event with type parameters of type AttributeModifier and TypeFieldDescriptionItemAttributeModifierEvent.ItemAttributeModifiersBuilder.Key.attr
The field for theattr
record component.Methods in net.neoforged.neoforge.event that return types with arguments of type AttributeModifier and TypeMethodDescriptionItemAttributeModifierEvent.ItemAttributeModifiersBuilder.Key.attr()
Returns the value of theattr
record component.Method parameters in net.neoforged.neoforge.event with type arguments of type AttributeModifier 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.boolean
ItemAttributeModifierEvent.removeAllModifiersFor
(Holder<Attribute> attribute) Removes all modifiers for the given attribute.(package private) boolean
ItemAttributeModifierEvent.ItemAttributeModifiersBuilder.removeModifier
(Holder<Attribute> attribute, ResourceLocation id) Removes a modifier for the target attribute with the given id.boolean
ItemAttributeModifierEvent.removeModifier
(Holder<Attribute> attribute, ResourceLocation id) Removes an attribute modifier for the target attribute by 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.Constructor parameters in net.neoforged.neoforge.event with type arguments of type AttributeModifierConstructorDescriptionprivate
Key
(Holder<Attribute> attr, ResourceLocation id) Creates an instance of aKey
record class. -
Uses of Attribute in net.neoforged.neoforge.event.entity
Method parameters in net.neoforged.neoforge.event.entity with type arguments of type AttributeModifier and TypeMethodDescriptionvoid
EntityAttributeModificationEvent.add
(EntityType<? extends LivingEntity> entityType, Holder<Attribute> attribute) void
EntityAttributeModificationEvent.add
(EntityType<? extends LivingEntity> entityType, Holder<Attribute> attribute, double value) boolean
EntityAttributeModificationEvent.has
(EntityType<? extends LivingEntity> entityType, Holder<Attribute> attribute) -
Uses of Attribute in net.neoforged.neoforge.registries
Method parameters in net.neoforged.neoforge.registries with type arguments of type Attribute