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> pContext, String pArgument) -
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<ResourceLocation> 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 pSource, Entity pEntity, Holder<Attribute> pAttribute, ResourceLocation pId, double pAmount, AttributeModifier.Operation pOperation) private static intAttributeCommand.getAttributeBase(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, double pScale) private static ComponentAttributeCommand.getAttributeDescription(Holder<Attribute> pAttribute) private static AttributeInstanceAttributeCommand.getAttributeInstance(Entity pEntity, Holder<Attribute> pAttribute) private static intAttributeCommand.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 intAttributeCommand.getAttributeValue(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, double pScale) private static LivingEntityAttributeCommand.getEntityWithAttribute(Entity pEntity, Holder<Attribute> pAttribute) private static intAttributeCommand.removeModifier(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, ResourceLocation pId) private static intAttributeCommand.resetAttributeBase(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute) private static intAttributeCommand.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 voidServerPlayer.onAttributeUpdated(Holder<Attribute> p_419585_) -
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> 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.voidMobEffect.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 doubleMob.getApproximateAttributeWith(ItemStack pItem, Holder<Attribute> pAttribute, EquipmentSlot pSlot) LivingEntity.getAttribute(Holder<Attribute> pAttribute) doubleLivingEntity.getAttributeBaseValue(Holder<Attribute> pAttribute) doubleLivingEntity.getAttributeValue(Holder<Attribute> pAttribute) protected voidLivingEntity.onAttributeUpdated(Holder<Attribute> pAttribute) protected voidMob.onAttributeUpdated(Holder<Attribute> p_363635_) -
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 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 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> pModifiers) private AttributeInstanceAttributeSupplier.createInstance(Consumer<AttributeInstance> pOnDirty, Holder<Attribute> pAttribute) private AttributeInstanceAttributeSupplier.getAttributeInstance(Holder<Attribute> pAttribute) doubleAttributeMap.getBaseValue(Holder<Attribute> pAttribute) doubleAttributeSupplier.getBaseValue(Holder<Attribute> pAttribute) AttributeMap.getInstance(Holder<Attribute> pAttribute) doubleAttributeMap.getModifierValue(Holder<Attribute> pAttribute, ResourceLocation pId) doubleAttributeSupplier.getModifierValue(Holder<Attribute> pAttribute, ResourceLocation pId) doubledoublebooleanAttributeMap.hasAttribute(Holder<Attribute> pAttribute) booleanAttributeSupplier.Builder.hasAttribute(Holder<Attribute> attribute) booleanAttributeSupplier.hasAttribute(Holder<Attribute> pAttribute) booleanAttributeMap.hasModifier(Holder<Attribute> pAttribute, ResourceLocation pId) booleanAttributeSupplier.hasModifier(Holder<Attribute> pAttribute, ResourceLocation pId) voidAttributeMap.removeAttributeModifiers(Multimap<Holder<Attribute>, AttributeModifier> pModifiers) booleanAttributeMap.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 aPackedrecord 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 voidAbstractHorse.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 TypeMethodDescriptionvoidItemStack.forEachModifier(EquipmentSlotGroup pSlot, org.apache.commons.lang3.function.TriConsumer<Holder<Attribute>, AttributeModifier, ItemAttributeModifiers.Display> pAction) voidItemStack.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.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> pAttribute, AttributeModifier pModifier, EquipmentSlotGroup pSlot) ItemAttributeModifiers.Builder.add(Holder<Attribute> pAttribute, AttributeModifier pModifier, EquipmentSlotGroup pSlot, ItemAttributeModifiers.Display pDisplay) voidItemAttributeModifiers.Display.apply(Consumer<Component> pOutput, Player pPlayer, Holder<Attribute> pAttribute, AttributeModifier pModifier) voidItemAttributeModifiers.Display.Default.apply(Consumer<Component> p_415634_, Player p_415547_, Holder<Attribute> p_416596_, AttributeModifier p_415942_) voidItemAttributeModifiers.Display.Hidden.apply(Consumer<Component> p_416397_, Player p_415921_, Holder<Attribute> p_415720_, AttributeModifier p_416314_) voidItemAttributeModifiers.Display.OverrideText.apply(Consumer<Component> p_416508_, Player p_416569_, Holder<Attribute> p_416290_, AttributeModifier p_416417_) voidItemAttributeModifiers.forEach(EquipmentSlotGroup pSlotGroup, BiConsumer<Holder<Attribute>, AttributeModifier> pAction) voidItemAttributeModifiers.forEach(EquipmentSlotGroup pSlot, org.apache.commons.lang3.function.TriConsumer<Holder<Attribute>, AttributeModifier, ItemAttributeModifiers.Display> pAction) voidItemAttributeModifiers.forEach(EquipmentSlot pEquipmentSlot, BiConsumer<Holder<Attribute>, AttributeModifier> pAction) booleanItemAttributeModifiers.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 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 pStack, EquipmentSlotGroup pSlotGroup, BiConsumer<Holder<Attribute>, AttributeModifier> pAction) static voidEnchantmentHelper.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.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 pEnchantmentLevel, EquipmentSlot pSlot) 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 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 aModifierrecord 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 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, 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