Interface StyleModifier

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 StyleModifier
Functional contract for mutating rich text Styles during dynamic enchantment tooltip rendering.

Registered in DynamicDescriptionFormatter and invoked when parsing style tags of the form <modifier=arg:content> or <modifier:content>.

  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.network.chat.Style
    apply(net.minecraft.network.chat.Style currentStyle, String arg)
    Applies a style transformation to the active Style on top of the formatting stack.
  • Method Details

    • apply

      net.minecraft.network.chat.Style apply(net.minecraft.network.chat.Style currentStyle, String arg)
      Applies a style transformation to the active Style on top of the formatting stack.
      Parameters:
      currentStyle - The current inherited Style in the parsing hierarchy.
      arg - The optional string argument parsed after '=' in the opening tag, or null if omitted.
      Returns:
      The new derived Style to push onto the style stack.