Class MultilineTextField

java.lang.Object
net.minecraft.client.gui.components.MultilineTextField

public class MultilineTextField extends Object
  • Field Details

    • NO_CHARACTER_LIMIT

      public static final int NO_CHARACTER_LIMIT
      See Also:
    • LINE_SEEK_PIXEL_BIAS

      private static final int LINE_SEEK_PIXEL_BIAS
      See Also:
    • font

      private final Font font
    • displayLines

      private final List<MultilineTextField.StringView> displayLines
    • value

      private String value
    • cursor

      private int cursor
    • selectCursor

      private int selectCursor
    • selecting

      private boolean selecting
    • characterLimit

      private int characterLimit
    • width

      private final int width
    • valueListener

      private Consumer<String> valueListener
    • cursorListener

      private Runnable cursorListener
  • Constructor Details

    • MultilineTextField

      public MultilineTextField(Font p_239611_, int p_239612_)
  • Method Details

    • characterLimit

      public int characterLimit()
    • setCharacterLimit

      public void setCharacterLimit(int p_240163_)
    • hasCharacterLimit

      public boolean hasCharacterLimit()
    • setValueListener

      public void setValueListener(Consumer<String> p_239920_)
    • setCursorListener

      public void setCursorListener(Runnable p_239258_)
    • setValue

      public void setValue(String p_239678_)
    • value

      public String value()
    • insertText

      public void insertText(String p_240016_)
    • deleteText

      public void deleteText(int p_239475_)
    • cursor

      public int cursor()
    • setSelecting

      public void setSelecting(boolean p_239951_)
    • getSelected

      public MultilineTextField.StringView getSelected()
    • getLineCount

      public int getLineCount()
    • getLineAtCursor

      public int getLineAtCursor()
    • getLineView

      public MultilineTextField.StringView getLineView(int p_239145_)
    • seekCursor

      public void seekCursor(Whence p_239798_, int p_239799_)
    • seekCursorLine

      public void seekCursorLine(int p_239394_)
    • seekCursorToPoint

      public void seekCursorToPoint(double p_239579_, double p_239580_)
    • keyPressed

      public boolean keyPressed(int p_239712_)
    • iterateLines

      public Iterable<MultilineTextField.StringView> iterateLines()
    • hasSelection

      public boolean hasSelection()
    • getSelectedText

      public String getSelectedText()
    • getCursorLineView

      private MultilineTextField.StringView getCursorLineView()
    • getCursorLineView

      private MultilineTextField.StringView getCursorLineView(int p_239855_)
    • getPreviousWord

      public MultilineTextField.StringView getPreviousWord()
    • getNextWord

      public MultilineTextField.StringView getNextWord()
    • getWordEndPosition

      private int getWordEndPosition(int p_240093_)
    • onValueChange

      private void onValueChange()
    • reflowDisplayLines

      private void reflowDisplayLines()
    • truncateFullText

      private String truncateFullText(String p_239843_)
    • truncateInsertionText

      private String truncateInsertionText(String p_239418_)