ItemAttributeModifiers
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.item.component.ItemAttributeModifiers;
Members
static builder() as Builder
compute(baseValue as double, slot as EquipmentSlot) as double
myItemAttributeModifiers.compute(myDouble, myEquipmentSlot);
Parameters:
baseValue: double
Type: double
slot: EquipmentSlot
Type: EquipmentSlot
Return Type:
double
forEach(slot as EquipmentSlot, consumer as BiConsumer<Attribute, AttributeModifier>)
// ItemAttributeModifiers.forEach(slot as EquipmentSlot, consumer as BiConsumer<Attribute, AttributeModifier>);myItemAttributeModifiers.forEach(myEquipmentSlot, myBiConsumer);
Parameters:
slot: EquipmentSlot
Type: EquipmentSlot
consumer: BiConsumer<Attribute, AttributeModifier>
Type: BiConsumer<Attribute, AttributeModifier>
Getter
myItemAttributeModifiers.modifiers
Return Type:
List<ItemAttributeModifiersEntry>
static of(modifiers as List<Entry>, showInTooltip as bool) as ItemAttributeModifiers
// ItemAttributeModifiers.of(modifiers as List<ItemAttributeModifiersEntry>, showInTooltip as bool) as ItemAttributeModifiers;ItemAttributeModifiers.of(myList, myBool);
Parameters:
modifiers: List<ItemAttributeModifiersEntry>
Type: List<ItemAttributeModifiersEntry>
showInTooltip: bool
Type: bool
Return Type:
ItemAttributeModifiers
Getter
// ItemAttributeModifiers.showInTooltip as boolmyItemAttributeModifiers.showInTooltip
Return Type:
bool
withModifierAdded(attribute as Attribute, modifier as AttributeModifier, slot as EquipmentSlotGroup) as ItemAttributeModifiers
// ItemAttributeModifiers.withModifierAdded(attribute as Attribute, modifier as AttributeModifier, slot as EquipmentSlotGroup) as ItemAttributeModifiers;myItemAttributeModifiers.withModifierAdded(myAttribute, myAttributeModifier, myEquipmentSlotGroup);
Parameters:
modifier: AttributeModifier
Type: AttributeModifier
slot: EquipmentSlotGroup
Type: EquipmentSlotGroup
Return Type:
ItemAttributeModifiers
withTooltip(showInTooltip as bool) as ItemAttributeModifiers
myItemAttributeModifiers.withTooltip(myBool);
Parameters:
showInTooltip: bool
Type: bool
Return Type:
ItemAttributeModifiers