Interface AttributeModifier.Builder

    • Method Detail

      • id

        AttributeModifier.Builder id​(java.util.UUID id)
        Sets the id of this attribute modifier.
        Parameters:
        id - The id
        Returns:
        This builder
      • randomId

        default AttributeModifier.Builder randomId()
        Sets this attribute modifier to have a random id.
        Returns:
        This builder
      • name

        AttributeModifier.Builder name​(java.lang.String name)
        Sets the name of this attribute modifier.

        The name of an attribute modifier corresponds to the translation displayed when listing all the modifiers on an item.

        The format of the translations is attribute.name.yournamehere.

        Parameters:
        name - The name
        Returns:
        This builder
      • operation

        default AttributeModifier.Builder operation​(java.util.function.Supplier<? extends AttributeOperation> operation)
        Sets the operation of this attribute modifier.
        Parameters:
        operation - The operation
        Returns:
        This builder
      • amount

        AttributeModifier.Builder amount​(double amount)
        Sets the amount of the attribute modifier.
        Parameters:
        amount - The amount
        Returns:
        This builder