Class SignUtils

java.lang.Object
org.geysermc.geyser.util.SignUtils

public class SignUtils extends Object
Provides utilities for interacting with signs. Mainly, it deals with the widths of each character. Since Bedrock auto-wraps signs and Java does not, we have to take this into account when translating signs.
  • Field Details

    • SIGN_WIDTH_MAX

      public static final int SIGN_WIDTH_MAX
      The maximum character width that a non-hanging sign can hold in both Java and Bedrock
      See Also:
      Constant Field Values
    • HANGING_SIGN_WIDTH_MAX

      public static final int HANGING_SIGN_WIDTH_MAX
      The maximum character width that a hanging sign can hold in both Java and Bedrock. Hanging signs are narrower.
      See Also:
      Constant Field Values
  • Constructor Details

    • SignUtils

      public SignUtils()
  • Method Details

    • getCharacterWidth

      public static int getCharacterWidth(char c)
      Gets the Minecraft width of a character
      Parameters:
      c - character to determine
      Returns:
      width of the character
    • getSignWidthMax

      public static int getSignWidthMax(boolean hanging)