diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/types/Chunk1_13Type.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/types/Chunk1_13Type.java index 1563d6c6d..7de8e508a 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/types/Chunk1_13Type.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/types/Chunk1_13Type.java @@ -13,6 +13,7 @@ import us.myles.ViaVersion.api.type.types.minecraft.BaseChunkType; import us.myles.ViaVersion.api.type.types.version.Types1_13; import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.logging.Level; @@ -55,7 +56,7 @@ public class Chunk1_13Type extends PartialType { } } - List nbtData = Arrays.asList(Type.NBT_ARRAY.read(input)); + List nbtData = new ArrayList<>(Arrays.asList(Type.NBT_ARRAY.read(input))); // Read all the remaining bytes (workaround for #681) if (input.readableBytes() > 0) { diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/types/Chunk1_14Type.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/types/Chunk1_14Type.java index c4c2b0181..43f2d7b74 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/types/Chunk1_14Type.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/types/Chunk1_14Type.java @@ -12,6 +12,7 @@ import us.myles.ViaVersion.api.type.types.minecraft.BaseChunkType; import us.myles.ViaVersion.api.type.types.version.Types1_13; import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -50,7 +51,7 @@ public class Chunk1_14Type extends PartialType { } } - List nbtData = Arrays.asList(Type.NBT_ARRAY.read(input)); + List nbtData = new ArrayList<>(Arrays.asList(Type.NBT_ARRAY.read(input))); // Read all the remaining bytes (workaround for #681) if (input.readableBytes() > 0) { diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_15to1_14_4/types/Chunk1_15Type.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_15to1_14_4/types/Chunk1_15Type.java index 298e41339..a947a585b 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_15to1_14_4/types/Chunk1_15Type.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_15to1_14_4/types/Chunk1_15Type.java @@ -12,6 +12,7 @@ import us.myles.ViaVersion.api.type.types.minecraft.BaseChunkType; import us.myles.ViaVersion.api.type.types.version.Types1_13; import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -51,7 +52,7 @@ public class Chunk1_15Type extends PartialType { sections[i] = section; } - List nbtData = Arrays.asList(Type.NBT_ARRAY.read(input)); + List nbtData = new ArrayList<>(Arrays.asList(Type.NBT_ARRAY.read(input))); // Read all the remaining bytes (workaround for #681) if (input.readableBytes() > 0) { diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/types/Chunk1_9_3_4Type.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/types/Chunk1_9_3_4Type.java index ca1740fcb..3669c213e 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/types/Chunk1_9_3_4Type.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/types/Chunk1_9_3_4Type.java @@ -13,6 +13,7 @@ import us.myles.ViaVersion.api.type.types.minecraft.BaseChunkType; import us.myles.ViaVersion.api.type.types.version.Types1_9; import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -51,7 +52,7 @@ public class Chunk1_9_3_4Type extends PartialType { } } - List nbtData = Arrays.asList(Type.NBT_ARRAY.read(input)); + List nbtData = new ArrayList<>(Arrays.asList(Type.NBT_ARRAY.read(input))); // Read all the remaining bytes (workaround for #681) if (input.readableBytes() > 0) {