diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerColossalChest.java b/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerColossalChest.java index f5e0fffb..6043d80d 100644 --- a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerColossalChest.java +++ b/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerColossalChest.java @@ -208,6 +208,9 @@ protected int getTagSize(Tag tag) { CompoundTag compound = (CompoundTag) tag; int size = 0; for (String key : compound.getAllKeys()) { + try { + size += key.getBytes("UTF-8").length; + } catch (UnsupportedEncodingException e) {} size += getTagSize(compound.get(key)); } return size; @@ -228,7 +231,7 @@ protected int getTagSize(Tag tag) { } if (tag instanceof StringTag) { try { - return ((StringTag) tag).getAsString().getBytes("UTF-8").length; + return ((StringTag) tag).getAsString().getBytes("UTF-8").length + 1; } catch (UnsupportedEncodingException e) {} } return tag.toString().length();