SPIGOT-7398: TextDisplay#setInterpolationDuration incorrectly updates the line width

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-07-08 13:07:16 +10:00
parent 8bd41d17a2
commit 475d2e005c
2 changed files with 93 additions and 3 deletions

View File

@@ -46,7 +46,7 @@ public class CraftTextDisplay extends CraftDisplay implements TextDisplay {
@Override
public void setLineWidth(int width) {
getHandle().setLineWidth(width);
getHandle().getEntityData().set(Display.TextDisplay.DATA_LINE_WIDTH_ID, width);
}
@Override
@@ -59,9 +59,9 @@ public class CraftTextDisplay extends CraftDisplay implements TextDisplay {
@Override
public void setBackgroundColor(Color color) {
if (color == null) {
getHandle().setBackgroundColor(-1);
getHandle().getEntityData().set(Display.TextDisplay.DATA_BACKGROUND_COLOR_ID, -1);
} else {
getHandle().setBackgroundColor(color.asARGB());
getHandle().getEntityData().set(Display.TextDisplay.DATA_BACKGROUND_COLOR_ID, color.asARGB());
}
}