public class AttributeModifier
extends java.lang.Object
Constructor and Description |
---|
AttributeModifier(Attribute attribute,
java.lang.String name,
Slot slot,
int operation,
double amount,
java.util.UUID uuid)
Constructor:
Generate a new attribute modifier, that can be applied on items.
|
AttributeModifier(java.lang.Object modifier)
Constructor:
Generate a new attribute modifier out of an existing item NBT.
|
AttributeModifier(java.lang.String attribute,
java.lang.String name,
java.lang.String slot,
int operation,
double amount,
java.util.UUID uuid)
Deprecated.
This method allows you to define any string as attribute and slot.
You should use the ENUM constructor to be on the safe side.
Only use this method, if there is any new attribute or slot, which is not present within the ENUM.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getNBT()
Generate an NBT compound from this modifier, so it can be applied on items
|
public AttributeModifier(Attribute attribute, java.lang.String name, Slot slot, int operation, double amount, java.util.UUID uuid)
attribute
- Predefined global and unique name of the attribute, that should be modifiedname
- Any name of this special modifierslot
- Predefined global and unique name of the slot, when the modifier should be appliedoperation
- Type of the modifieramount
- Value of modificationuuid
- Some UUID for this modifier@Deprecated public AttributeModifier(java.lang.String attribute, java.lang.String name, java.lang.String slot, int operation, double amount, java.util.UUID uuid)
attribute
- Predefined global and unique name of the attribute, that should be modifiedname
- Any name of this special modifierslot
- Predefined global and unique name of the slot, when the modifier should be appliedoperation
- Type of the modifieramount
- Value of modificationuuid
- Some UUID for this modifierpublic AttributeModifier(java.lang.Object modifier)
modifier
- NBT compound of the item [net.minecraft.server.NBTTagCompound]