Fixed color serialization

This commit is contained in:
Felix Cravic 2020-07-31 23:02:01 +02:00
parent 7f5f8bf2f6
commit 3b24be4925
3 changed files with 7 additions and 6 deletions

View File

@ -51,17 +51,17 @@ public class ChatColor {
colorCode.put("black", BLACK); colorCode.put("black", BLACK);
colorCode.put("dark_blue", DARK_BLUE); colorCode.put("dark_blue", DARK_BLUE);
colorCode.put("dark_green", DARK_GREEN); colorCode.put("dark_green", DARK_GREEN);
colorCode.put("dark_cyan", DARK_CYAN); colorCode.put("dark_aqua", DARK_CYAN);
colorCode.put("dark_red", DARK_RED); colorCode.put("dark_red", DARK_RED);
colorCode.put("purple", PURPLE); colorCode.put("dark_purple", PURPLE);
colorCode.put("gold", GOLD); colorCode.put("gold", GOLD);
colorCode.put("gray", GRAY); colorCode.put("gray", GRAY);
colorCode.put("dark_gray", DARK_GRAY); colorCode.put("dark_gray", DARK_GRAY);
colorCode.put("blue", BLUE); colorCode.put("blue", BLUE);
colorCode.put("bright_green", BRIGHT_GREEN); colorCode.put("green", BRIGHT_GREEN);
colorCode.put("cyan", CYAN); colorCode.put("aqua", CYAN);
colorCode.put("red", RED); colorCode.put("red", RED);
colorCode.put("pink", PINK); colorCode.put("light_purple", PINK);
colorCode.put("yellow", YELLOW); colorCode.put("yellow", YELLOW);
colorCode.put("white", WHITE); colorCode.put("white", WHITE);

View File

@ -100,7 +100,7 @@ public class ColoredText {
this.compiledJson = getJsonObject().toString(); this.compiledJson = getJsonObject().toString();
this.updated = true; this.updated = true;
} }
return compiledJson; return compiledJson;
} }

View File

@ -16,6 +16,7 @@ import org.jglrxavpok.hephaistos.nbt.NBTCompound;
import java.util.*; import java.util.*;
// TODO should we cache a ByteBuf of this item for faster packet write
public class ItemStack implements DataContainer { public class ItemStack implements DataContainer {
private static final StackingRule DEFAULT_STACKING_RULE = new VanillaStackingRule(127); private static final StackingRule DEFAULT_STACKING_RULE = new VanillaStackingRule(127);