Uses of Class
net.minecraft.world.entity.ai.attributes.Attribute
Packages that use Attribute
Package
Description
-
Uses of Attribute in net.minecraft.advancements.critereon
Fields in net.minecraft.advancements.critereon with type parameters of type AttributeModifier and TypeFieldDescriptionItemAttributeModifiersPredicate.EntryPredicate.attributeThe field for theattributerecord component.Methods in net.minecraft.advancements.critereon that return types with arguments of type AttributeModifier and TypeMethodDescriptionItemAttributeModifiersPredicate.EntryPredicate.attribute()Returns the value of theattributerecord component.Constructor parameters in net.minecraft.advancements.critereon 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 aEntryPredicaterecord class. -
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 argument) -
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 entity, Holder<Attribute> attribute, ResourceLocation id, double amount, AttributeModifier.Operation operation) private static intAttributeCommand.getAttributeBase(CommandSourceStack source, Entity entity, Holder<Attribute> attribute, double scale) private static ComponentAttributeCommand.getAttributeDescription(Holder<Attribute> attribute) private static AttributeInstanceAttributeCommand.getAttributeInstance(Entity entity, Holder<Attribute> attribute) private static intAttributeCommand.getAttributeModifier(CommandSourceStack source, Entity entity, Holder<Attribute> attribute, ResourceLocation id, double scale) private static intAttributeCommand.getAttributeValue(CommandSourceStack source, Entity entity, Holder<Attribute> attribute, double scale) private static LivingEntityAttributeCommand.getEntityWithAttribute(Entity entity, Holder<Attribute> attribute) private static intAttributeCommand.removeModifier(CommandSourceStack source, Entity entity, Holder<Attribute> attribute, ResourceLocation id) private static intAttributeCommand.setAttributeBase(CommandSourceStack source, Entity entity, Holder<Attribute> attribute, double value) -
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, ResourceLocation id, double amount, AttributeModifier.Operation operation) 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.voidMobEffect.createModifiers(int amplifier, BiConsumer<Holder<Attribute>, AttributeModifier> output) -
Uses of Attribute in net.minecraft.world.entity
Method parameters in net.minecraft.world.entity with type arguments of type AttributeModifier and TypeMethodDescriptionLivingEntity.getAttribute(Holder<Attribute> attribute) doubleLivingEntity.getAttributeBaseValue(Holder<Attribute> attribute) doubleLivingEntity.getAttributeValue(Holder<Attribute> attribute) private voidLivingEntity.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 ofprivate final Map<Holder<Attribute>, AttributeInstance> AttributeMap.attributesAttributes.BLOCK_BREAK_SPEEDAttributes.BLOCK_INTERACTION_RANGEprivate final Map<Holder<Attribute>, AttributeInstance> AttributeSupplier.Builder.builderAttributes.BURNING_TIMEAttribute.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.WATER_MOVEMENT_EFFICIENCYMethods in net.minecraft.world.entity.ai.attributes that return AttributeModifier and TypeMethodDescriptionAttribute.setSentiment(Attribute.Sentiment sentiment) Attribute.setSyncable(boolean watch) 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 AttributeMethods 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(com.google.common.collect.Multimap<Holder<Attribute>, AttributeModifier> modifiers) private AttributeInstanceAttributeSupplier.createInstance(Consumer<AttributeInstance> onDirty, Holder<Attribute> attribute) private AttributeInstanceAttributeSupplier.getAttributeInstance(Holder<Attribute> attribute) doubleAttributeMap.getBaseValue(Holder<Attribute> attribute) doubleAttributeSupplier.getBaseValue(Holder<Attribute> attribute) AttributeMap.getInstance(Holder<Attribute> attribute) doubleAttributeMap.getModifierValue(Holder<Attribute> attribute, ResourceLocation id) doubleAttributeSupplier.getModifierValue(Holder<Attribute> attribute, ResourceLocation id) doubledoublebooleanAttributeMap.hasAttribute(Holder<Attribute> attribute) booleanAttributeSupplier.Builder.hasAttribute(Holder<Attribute> attribute) booleanAttributeSupplier.hasAttribute(Holder<Attribute> attribute) booleanAttributeMap.hasModifier(Holder<Attribute> attribute, ResourceLocation id) booleanAttributeSupplier.hasModifier(Holder<Attribute> attribute, ResourceLocation id) voidAttributeMap.removeAttributeModifiers(com.google.common.collect.Multimap<Holder<Attribute>, AttributeModifier> modifiers) Constructor parameters in net.minecraft.world.entity.ai.attributes with type arguments of type AttributeModifierConstructorDescriptionAttributeInstance(Holder<Attribute> attribute, Consumer<AttributeInstance> onDirty) (package private)AttributeSupplier(Map<Holder<Attribute>, AttributeInstance> instances) -
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 voidAbstractHorse.setOffspringAttribute(AgeableMob parent, AbstractHorse child, Holder<Attribute> attribute, double min, double max) -
Uses of Attribute in net.minecraft.world.item
Method parameters in net.minecraft.world.item with type arguments of type AttributeModifier and TypeMethodDescriptionprivate voidItemStack.addModifierTooltip(Consumer<Component> tooltipAdder, Player player, Holder<Attribute> attribute, AttributeModifier modifier) voidItemStack.forEachModifier(EquipmentSlotGroup slotGroup, BiConsumer<Holder<Attribute>, AttributeModifier> action) voidItemStack.forEachModifier(EquipmentSlot equipmentSLot, BiConsumer<Holder<Attribute>, AttributeModifier> action) -
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) voidItemAttributeModifiers.forEach(EquipmentSlotGroup slotGroup, BiConsumer<Holder<Attribute>, AttributeModifier> action) voidItemAttributeModifiers.forEach(EquipmentSlot equipmentSlot, BiConsumer<Holder<Attribute>, AttributeModifier> action) booleanItemAttributeModifiers.Entry.matches(Holder<Attribute> attribute, ResourceLocation 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) 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 stack, EquipmentSlotGroup slotGroup, BiConsumer<Holder<Attribute>, AttributeModifier> action) static voidEnchantmentHelper.forEachModifier(ItemStack stack, EquipmentSlot slot, BiConsumer<Holder<Attribute>, AttributeModifier> action) -
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 com.google.common.collect.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(ResourceLocation 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(ResourceLocation id, Holder<Attribute> attribute, AttributeModifier.Operation operation, NumberProvider amount) 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 aModifierrecord class.ModifierBuilder(ResourceLocation 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 com.google.common.collect.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 com.google.common.collect.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, 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.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, ResourceLocation id) Removes a modifier for the target attribute with the given id.booleanItemAttributeModifierEvent.removeModifier(Holder<Attribute> attribute, ResourceLocation id) Removes an attribute modifier for the target attribute by id(package private) 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, ResourceLocation 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
Method parameters in net.neoforged.neoforge.registries with type arguments of type Attribute