Don't truncate text on arena signs.
Turns out this isn't necessary at all. I think the server used to throw an exception if there were too many characters on a sign, but it doesn't seem to be the case anymore (tested on 1.21 and 1.13.2). This commit simply removes the truncation logic from the sign rendering procedure, and it fixes issues where text that would otherwise fit on a sign would be cut off, but more specifically one where color codes would sort of "push" characters out of the sign despite not being visible. Fixes #790
This commit is contained in:
@@ -26,8 +26,7 @@ class RendersTemplate {
|
||||
|
||||
String[] result = new String[lines.length];
|
||||
for (int i = 0; i < lines.length; i++) {
|
||||
String rendered = render(lines[i], arena);
|
||||
result[i] = truncate(rendered);
|
||||
result[i] = render(lines[i], arena);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -129,11 +128,4 @@ class RendersTemplate {
|
||||
}
|
||||
}
|
||||
|
||||
private String truncate(String rendered) {
|
||||
if (rendered.length() <= 15) {
|
||||
return rendered;
|
||||
}
|
||||
return rendered.substring(0, 15);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user