Package org.geysermc.geyser.util
Class SignUtils
java.lang.Object
org.geysermc.geyser.util.SignUtils
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 Summary
Modifier and TypeFieldDescriptionstatic int
The maximum character width that a sign can hold in Bedrockstatic int
The maximum character width that a sign can hold in Java -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
getCharacterWidth(char c)
Gets the Minecraft width of a character
-
Field Details
-
BEDROCK_CHARACTER_WIDTH_MAX
public static final int BEDROCK_CHARACTER_WIDTH_MAXThe 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_MAXThe 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
-