Readd block entity wrapping

This commit is contained in:
KennyTV 2020-04-04 00:37:06 +02:00
parent 3737242226
commit df702736bf
4 changed files with 8 additions and 4 deletions

View File

@ -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<Chunk, ClientWorld> {
}
}
List<CompoundTag> nbtData = Arrays.asList(Type.NBT_ARRAY.read(input));
List<CompoundTag> nbtData = new ArrayList<>(Arrays.asList(Type.NBT_ARRAY.read(input)));
// Read all the remaining bytes (workaround for #681)
if (input.readableBytes() > 0) {

View File

@ -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<Chunk, ClientWorld> {
}
}
List<CompoundTag> nbtData = Arrays.asList(Type.NBT_ARRAY.read(input));
List<CompoundTag> nbtData = new ArrayList<>(Arrays.asList(Type.NBT_ARRAY.read(input)));
// Read all the remaining bytes (workaround for #681)
if (input.readableBytes() > 0) {

View File

@ -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<Chunk, ClientWorld> {
sections[i] = section;
}
List<CompoundTag> nbtData = Arrays.asList(Type.NBT_ARRAY.read(input));
List<CompoundTag> nbtData = new ArrayList<>(Arrays.asList(Type.NBT_ARRAY.read(input)));
// Read all the remaining bytes (workaround for #681)
if (input.readableBytes() > 0) {

View File

@ -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<Chunk, ClientWorld> {
}
}
List<CompoundTag> nbtData = Arrays.asList(Type.NBT_ARRAY.read(input));
List<CompoundTag> nbtData = new ArrayList<>(Arrays.asList(Type.NBT_ARRAY.read(input)));
// Read all the remaining bytes (workaround for #681)
if (input.readableBytes() > 0) {