Interface ActiveTextCollector

All Known Implementing Classes:
ActiveTextCollector.ClickableStyleFinder

public interface ActiveTextCollector
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Finds what a click at a point lands on: a part of the text with a click event, or with an insertion when asked.
    static final record 
    How a line is drawn: only its opacity here.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(TextAlignment alignment, int anchorX, int y, ActiveTextCollector.Parameters parameters, net.minecraft.util.FormattedCharSequence text)
     
     
    static @Nullable net.minecraft.network.chat.Style
    styleAt(net.minecraft.client.gui.Font font, net.minecraft.util.FormattedCharSequence text, int left, int y, int testX, int testY)
    The style under a point of the text: null when it's on none of the lines.
  • Method Details

    • defaultParameters

      ActiveTextCollector.Parameters defaultParameters()
    • accept

      void accept(TextAlignment alignment, int anchorX, int y, ActiveTextCollector.Parameters parameters, net.minecraft.util.FormattedCharSequence text)
    • styleAt

      @Nullable static @Nullable net.minecraft.network.chat.Style styleAt(net.minecraft.client.gui.Font font, net.minecraft.util.FormattedCharSequence text, int left, int y, int testX, int testY)
      The style under a point of the text: null when it's on none of the lines.