Interface ValueModifier

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ValueModifier
Functional contract for transforming evaluated floating-point numbers into formatted strings during dynamic enchantment description parsing.

Registered in DynamicDescriptionFormatter and invoked inside-out when evaluating tags of the form <modifier:arg:value> or <modifier:value>.

  • Method Summary

    Modifier and Type
    Method
    Description
    apply(String arg, float value)
    Applies a mathematical or formatting transformation to the specified numeric value.
  • Method Details

    • apply

      String apply(String arg, float value)
      Applies a mathematical or formatting transformation to the specified numeric value.
      Parameters:
      arg - The optional string argument parsed from the modifier tag (e.g., divisor or decimal precision), or null if omitted.
      value - The floating-point value being transformed.
      Returns:
      The formatted string representation of the transformed value.