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> context, String name) -
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.attributeThe field for theattributerecord component.Methods in net.minecraft.core.component.predicates that return types with arguments of type AttributeModifier and TypeMethodDescriptionAttributeModifiersPredicate.EntryPredicate.attribute()Returns the value of theattributerecord component.Constructor parameters in net.minecraft.core.component.predicates with type arguments of type AttributeModifierConstructorDescriptionEntryPredicate(Optional<HolderSet<Attribute>> attribute, Optional<Identifier> id, MinMaxBounds.Doubles amount, Optional<AttributeModifier.Operation> operation, Optional<EquipmentSlotGroup> slot) Creates an instance of aEntryPredicaterecord 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.attributeThe field for theattributerecord component.Methods in net.minecraft.network.protocol.game that return types with arguments of type AttributeModifier and TypeMethodDescriptionClientboundUpdateAttributesPacket.AttributeSnapshot.attribute()Returns the value of theattributerecord 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 aAttributeSnapshotrecord 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 intAttributeCommand.addModifier(CommandSourceStack source, Entity target, Holder<Attribute> attribute, Identifier id, double value, AttributeModifier.Operation operation) private static intAttributeCommand.getAttributeBase(CommandSourceStack source, Entity target, Holder<Attribute> attribute, double scale) private static ComponentAttributeCommand.getAttributeDescription(Holder<Attribute> attribute) private static AttributeInstanceAttributeCommand.getAttributeInstance(Entity target, Holder<Attribute> attribute) private static intAttributeCommand.getAttributeModifier(CommandSourceStack source, Entity target, Holder<Attribute> attribute, Identifier id, double scale) private static Stream<Identifier> AttributeCommand.getAttributeModifiers(Entity target, Holder<Attribute> attribute) private static intAttributeCommand.getAttributeValue(CommandSourceStack source, Entity target, Holder<Attribute> attribute, double scale) private static LivingEntityAttributeCommand.getEntityWithAttribute(Entity target, Holder<Attribute> attribute) private static intAttributeCommand.removeModifier(CommandSourceStack source, Entity target, Holder<Attribute> attribute, Identifier id) private static intAttributeCommand.resetAttributeBase(CommandSourceStack source, Entity target, Holder<Attribute> attribute) private static intAttributeCommand.setAttributeBase(CommandSourceStack source, Entity target, Holder<Attribute> attribute, double value) -
Uses of Attribute in net.minecraft.server.level
Method parameters in net.minecraft.server.level with type arguments of type AttributeModifier and TypeMethodDescriptionprotected voidServerPlayer.onAttributeUpdated(Holder<Attribute> attribute) -
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.attributeModifiersContains 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> attribute, Identifier id, double amount, AttributeModifier.Operation operation) MobEffect.addAttributeModifier(Holder<Attribute> attribute, Identifier 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.voidMobEffect.createModifiers(int amplifier, BiConsumer<Holder<Attribute>, AttributeModifier> consumer) -
Uses of Attribute in net.minecraft.world.entity
Method parameters in net.minecraft.world.entity with type arguments of type AttributeModifier and TypeMethodDescriptionprivate doubleMob.getApproximateAttributeWith(ItemStack itemStack, Holder<Attribute> attribute, EquipmentSlot slot) @Nullable AttributeInstanceLivingEntity.getAttribute(Holder<Attribute> attribute) doubleLivingEntity.getAttributeBaseValue(Holder<Attribute> attribute) doubleLivingEntity.getAttributeValue(Holder<Attribute> attribute) protected voidLivingEntity.onAttributeUpdated(Holder<Attribute> attribute) protected voidMob.onAttributeUpdated(Holder<Attribute> attribute) -
Uses of Attribute in net.minecraft.world.entity.ai.attributes
Subclasses of Attribute in net.minecraft.world.entity.ai.attributesModifier and TypeClassDescriptionclassDefines 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.ARMORHandles the armor points for an entity.Attributes.ARMOR_TOUGHNESSHandles the amount of damage mitigated by wearing armor.Attributes.ATTACK_DAMAGEHandles the attack damage inflicted by entities.Attributes.ATTACK_KNOCKBACKHandles additional horizontal knockback when damaging another entity.Attributes.ATTACK_SPEEDHandles the cooldown rate when attacking with an item.AttributeInstance.attributeThe Attribute this is an instance ofAttributeInstance.Packed.attributeThe field for theattributerecord component.private final Map<Holder<Attribute>, AttributeInstance> AttributeMap.attributesAttributes.BLOCK_BREAK_SPEEDAttributes.BLOCK_INTERACTION_RANGEprivate final Map<Holder<Attribute>, AttributeInstance> AttributeSupplier.Builder.builderAttributes.BURNING_TIMEAttributes.CAMERA_DISTANCEAttribute.CODECAttributes.ENTITY_INTERACTION_RANGEAttributes.EXPLOSION_KNOCKBACK_RESISTANCEAttributes.FALL_DAMAGE_MULTIPLIERAttributes.FLYING_SPEEDHandles the movement speed of flying entities such as parrots and bees.Attributes.FOLLOW_RANGEHandles the range in blocks that a mob will notice and track players and other potential targets.Attributes.GRAVITYprivate final Map<Holder<Attribute>, AttributeInstance> AttributeSupplier.instancesAttributes.JUMP_STRENGTHHandles the jump strength for horses.Attributes.KNOCKBACK_RESISTANCEHandles the reduction of horizontal knockback when damaged by attacks or projectiles.Attributes.LUCKHandles luck when a player generates loot from a loot table.Attributes.MAX_ABSORPTIONAttributes.MAX_HEALTHHandles the maximum health of an entity.Attributes.MINING_EFFICIENCYAttributes.MOVEMENT_EFFICIENCYAttributes.MOVEMENT_SPEEDHandles the movement speed of entities.Attributes.OXYGEN_BONUSAttributes.SAFE_FALL_DISTANCEAttributes.SCALEAttributes.SNEAKING_SPEEDAttributes.SPAWN_REINFORCEMENTS_CHANCEHandles the chance for a zombie to summon reinforcements when attacked.Attributes.STEP_HEIGHTstatic final StreamCodec<RegistryFriendlyByteBuf, Holder<Attribute>> Attribute.STREAM_CODECAttributes.SUBMERGED_MINING_SPEEDAttributes.SWEEPING_DAMAGE_RATIOAttributes.TEMPT_RANGEAttributes.WATER_MOVEMENT_EFFICIENCYAttributes.WAYPOINT_RECEIVE_RANGEAttributes.WAYPOINT_TRANSMIT_RANGEMethods in net.minecraft.world.entity.ai.attributes that return AttributeModifier and TypeMethodDescriptionAttribute.setSentiment(Attribute.Sentiment sentiment) Attribute.setSyncable(boolean syncable) 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 theattributerecord 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 TypeMethodDescriptionvoidAttributeMap.addTransientAttributeModifiers(Multimap<Holder<Attribute>, AttributeModifier> modifiers) private AttributeInstance@Nullable AttributeInstanceAttributeSupplier.createInstance(Consumer<AttributeInstance> onDirty, Holder<Attribute> attribute) private AttributeInstanceAttributeSupplier.getAttributeInstance(Holder<Attribute> attribute) doubleAttributeMap.getBaseValue(Holder<Attribute> attribute) doubleAttributeSupplier.getBaseValue(Holder<Attribute> attribute) @Nullable AttributeInstanceAttributeMap.getInstance(Holder<Attribute> attribute) doubleAttributeMap.getModifierValue(Holder<Attribute> attribute, Identifier id) doubleAttributeSupplier.getModifierValue(Holder<Attribute> attribute, Identifier id) doubledoublebooleanAttributeMap.hasAttribute(Holder<Attribute> attribute) booleanAttributeSupplier.Builder.hasAttribute(Holder<Attribute> attribute) booleanAttributeSupplier.hasAttribute(Holder<Attribute> attribute) booleanAttributeMap.hasModifier(Holder<Attribute> attribute, Identifier id) booleanAttributeSupplier.hasModifier(Holder<Attribute> attribute, Identifier modifier) voidAttributeMap.removeAttributeModifiers(Multimap<Holder<Attribute>, AttributeModifier> modifiers) booleanAttributeMap.resetBaseValue(Holder<Attribute> attribute) Constructor parameters in net.minecraft.world.entity.ai.attributes with type arguments of type AttributeModifierConstructorDescriptionAttributeInstance(Holder<Attribute> attribute, Consumer<AttributeInstance> onDirty) privateAttributeSupplier(Map<Holder<Attribute>, AttributeInstance> instances) Packed(Holder<Attribute> attribute, double baseValue, List<AttributeModifier> modifiers) Creates an instance of aPackedrecord class. -
Uses of Attribute in net.minecraft.world.entity.animal.equine
Method parameters in net.minecraft.world.entity.animal.equine with type arguments of type AttributeModifier and TypeMethodDescriptionprivate voidAbstractHorse.setOffspringAttribute(AgeableMob partner, AbstractHorse baby, Holder<Attribute> attribute, double attributeRangeMin, double attributeRangeMax) -
Uses of Attribute in net.minecraft.world.item
Method parameters in net.minecraft.world.item with type arguments of type AttributeModifier and TypeMethodDescriptionvoidItemStack.forEachModifier(EquipmentSlotGroup slot, org.apache.commons.lang3.function.TriConsumer<Holder<Attribute>, AttributeModifier, ItemAttributeModifiers.Display> consumer) voidItemStack.forEachModifier(EquipmentSlot slot, BiConsumer<Holder<Attribute>, AttributeModifier> consumer) -
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.attributeThe field for theattributerecord component.Methods in net.minecraft.world.item.component that return types with arguments of type AttributeModifier and TypeMethodDescriptionItemAttributeModifiers.Entry.attribute()Returns the value of theattributerecord component.Method parameters in net.minecraft.world.item.component with type arguments of type AttributeModifier and TypeMethodDescriptionItemAttributeModifiers.Builder.add(Holder<Attribute> attribute, AttributeModifier modifier, EquipmentSlotGroup slot) ItemAttributeModifiers.Builder.add(Holder<Attribute> attribute, AttributeModifier modifier, EquipmentSlotGroup slot, ItemAttributeModifiers.Display display) voidItemAttributeModifiers.Display.apply(Consumer<Component> consumer, @Nullable Player player, Holder<Attribute> attribute, AttributeModifier modifier) voidItemAttributeModifiers.Display.Default.apply(Consumer<Component> consumer, @Nullable Player player, Holder<Attribute> attribute, AttributeModifier modifier) voidItemAttributeModifiers.Display.Hidden.apply(Consumer<Component> consumer, @Nullable Player player, Holder<Attribute> attribute, AttributeModifier modifier) voidItemAttributeModifiers.Display.OverrideText.apply(Consumer<Component> consumer, @Nullable Player player, Holder<Attribute> attribute, AttributeModifier modifier) doubleItemAttributeModifiers.compute(Holder<Attribute> attribute, double baseValue, EquipmentSlot slot) voidItemAttributeModifiers.forEach(EquipmentSlotGroup slot, BiConsumer<Holder<Attribute>, AttributeModifier> consumer) voidItemAttributeModifiers.forEach(EquipmentSlotGroup slot, org.apache.commons.lang3.function.TriConsumer<Holder<Attribute>, AttributeModifier, ItemAttributeModifiers.Display> consumer) voidItemAttributeModifiers.forEach(EquipmentSlot slot, BiConsumer<Holder<Attribute>, AttributeModifier> consumer) booleanItemAttributeModifiers.Entry.matches(Holder<Attribute> attribute, Identifier id) ItemAttributeModifiers.withModifierAdded(Holder<Attribute> attribute, AttributeModifier modifier, EquipmentSlotGroup slot) Constructor parameters in net.minecraft.world.item.component with type arguments of type AttributeModifierConstructorDescriptionEntry(Holder<Attribute> attribute, AttributeModifier modifier, EquipmentSlotGroup slot) Entry(Holder<Attribute> attribute, AttributeModifier modifier, EquipmentSlotGroup slot, ItemAttributeModifiers.Display display) Creates an instance of aEntryrecord 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 voidEnchantmentHelper.forEachModifier(ItemStack itemStack, EquipmentSlotGroup slot, BiConsumer<Holder<Attribute>, AttributeModifier> consumer) static voidEnchantmentHelper.forEachModifier(ItemStack itemStack, EquipmentSlot slot, BiConsumer<Holder<Attribute>, AttributeModifier> consumer) -
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.attributeThe field for theattributerecord component.Methods in net.minecraft.world.item.enchantment.effects that return types with arguments of type AttributeModifier and TypeMethodDescriptionEnchantmentAttributeEffect.attribute()Returns the value of theattributerecord component.private HashMultimap<Holder<Attribute>, AttributeModifier> EnchantmentAttributeEffect.makeAttributeMap(int enchantmentLevel, EquipmentSlot slot) Constructor parameters in net.minecraft.world.item.enchantment.effects with type arguments of type AttributeModifierConstructorDescriptionEnchantmentAttributeEffect(Identifier id, Holder<Attribute> attribute, LevelBasedValue amount, AttributeModifier.Operation operation) Creates an instance of aEnchantmentAttributeEffectrecord 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.attributeThe field for theattributerecord component.SetAttributesFunction.ModifierBuilder.attributeMethods in net.minecraft.world.level.storage.loot.functions that return types with arguments of type AttributeModifier and TypeMethodDescriptionSetAttributesFunction.Modifier.attribute()Returns the value of theattributerecord component.Method parameters in net.minecraft.world.level.storage.loot.functions with type arguments of type AttributeModifier and TypeMethodDescriptionSetAttributesFunction.modifier(Identifier id, Holder<Attribute> attribute, AttributeModifier.Operation operation, NumberProvider amount) Constructor parameters in net.minecraft.world.level.storage.loot.functions with type arguments of type AttributeModifierConstructorDescriptionprivateModifier(Identifier id, Holder<Attribute> attribute, AttributeModifier.Operation operation, NumberProvider amount, List<EquipmentSlotGroup> slots) Creates an instance of aModifierrecord class.ModifierBuilder(Identifier id, Holder<Attribute> attribute, AttributeModifier.Operation operation, NumberProvider amount) -
Uses of Attribute in net.neoforged.neoforge.common
Subclasses of Attribute in net.neoforged.neoforge.commonModifier and TypeClassDescriptionclassA boolean attribute only has two states, on or off, represented by a value of 0 (false) or 1 (true).classA 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.ATTRIBUTESNeoForgeMod.CREATIVE_FLIGHTThis attribute controls if the player may use creative flight when not in creative mode.NeoForgeMod.NAMETAG_DISTANCENeoForgeMod.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 Multimap<Holder<Attribute>, AttributeModifier> AttributeUtil.getSortedModifiers(ItemStack stack, EquipmentSlotGroup slot) Returns a sorted, mutableMultimapcontaining all the attribute modifiers on an item stack for the given group.static Multimap<Holder<Attribute>, AttributeModifier> AttributeUtil.sortedMap()Creates a sortedTreeMultimapused 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 voidAttributeUtil.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 voidAttributeUtil.applyTextFor(ItemStack stack, Consumer<Component> tooltip, 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.attrThe field for theattrrecord component.Methods in net.neoforged.neoforge.event that return types with arguments of type AttributeModifier and TypeMethodDescriptionItemAttributeModifierEvent.ItemAttributeModifiersBuilder.Key.attr()Returns the value of theattrrecord component.Method parameters in net.neoforged.neoforge.event with type arguments of type AttributeModifier and TypeMethodDescriptionbooleanItemAttributeModifierEvent.addModifier(Holder<Attribute> attribute, AttributeModifier modifier, EquipmentSlotGroup slot) Adds a new attribute modifier to the given stack.(package private) booleanItemAttributeModifierEvent.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.booleanItemAttributeModifierEvent.removeAllModifiersFor(Holder<Attribute> attribute) Removes all modifiers for the given attribute.(package private) booleanItemAttributeModifierEvent.ItemAttributeModifiersBuilder.removeModifier(Holder<Attribute> attribute, Identifier id) Removes a modifier for the target attribute with the given id.booleanItemAttributeModifierEvent.removeModifier(Holder<Attribute> attribute, Identifier id) Removes an attribute modifier for the target attribute by id(package private) @Nullable ItemAttributeModifiers.EntryItemAttributeModifierEvent.ItemAttributeModifiersBuilder.replaceModifier(Holder<Attribute> attribute, AttributeModifier modifier, EquipmentSlotGroup slot) Adds a modifier to the list, replacing any existing modifiers with the same id.voidItemAttributeModifierEvent.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 AttributeModifierConstructorDescriptionprivateKey(Holder<Attribute> attr, Identifier id) Creates an instance of aKeyrecord 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 TypeMethodDescriptionvoidEntityAttributeModificationEvent.add(EntityType<? extends LivingEntity> entityType, Holder<Attribute> attribute) voidEntityAttributeModificationEvent.add(EntityType<? extends LivingEntity> entityType, Holder<Attribute> attribute, double value) booleanEntityAttributeModificationEvent.has(EntityType<? extends LivingEntity> entityType, Holder<Attribute> attribute) -
Uses of Attribute in net.neoforged.neoforge.registries
Classes in net.neoforged.neoforge.registries that implement interfaces with type arguments of type AttributeModifier and TypeClassDescription(package private) static classMethod parameters in net.neoforged.neoforge.registries with type arguments of type Attribute