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

    • BEDROCK_CHARACTER_WIDTH_MAX

      public static final int BEDROCK_CHARACTER_WIDTH_MAX
      The maximum character width that a sign can hold in Bedrock
      See Also:
      Constant Field Values
    • JAVA_CHARACTER_WIDTH_MAX

      public static final int JAVA_CHARACTER_WIDTH_MAX
      The maximum character width that a sign can hold in Java
      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