AttributeModifier: {
    type: "compound";
    value: {
        Amount: { type: "float"; value: number };
        Name: { type: "string"; value: string };
        Operand: { type: "int"; value: number };
        Operation: { type: "int"; value: number };
        UUIDLeast: { type: "long"; value: [high: number, low: number] };
        UUIDMost: { type: "long"; value: [high: number, low: number] };
    };
}

NBT structure of an attribute modifier.

Type declaration

  • type: "compound"
  • value: {
        Amount: { type: "float"; value: number };
        Name: { type: "string"; value: string };
        Operand: { type: "int"; value: number };
        Operation: { type: "int"; value: number };
        UUIDLeast: { type: "long"; value: [high: number, low: number] };
        UUIDMost: { type: "long"; value: [high: number, low: number] };
    }
    • Amount: { type: "float"; value: number }

      The amount by which this Modifier modifies the Base value in calculations.

    • Name: { type: "string"; value: string }

      The Modifier's name.

    • Operand: { type: "int"; value: number }

      UNDOCUMENTED.

    • Operation: { type: "int"; value: number }

      Defines the operation this Modifier executes on the Attribute's Base value. 0: Increment X by Amount, 1: Increment Y by X * Amount, 2: Y = Y * (1 + Amount) (equivalent to Increment Y by Y * Amount). needs testing

    • UUIDLeast: { type: "long"; value: [high: number, low: number] }

      This modifier's UUID Least.

    • UUIDMost: { type: "long"; value: [high: number, low: number] }

      This modifier's UUID Most.