mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-26 20:16:02 +01:00
Readd block entity wrapping
This commit is contained in:
parent
3737242226
commit
df702736bf
@ -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.api.type.types.version.Types1_13;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
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)
|
// Read all the remaining bytes (workaround for #681)
|
||||||
if (input.readableBytes() > 0) {
|
if (input.readableBytes() > 0) {
|
||||||
|
@ -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.api.type.types.version.Types1_13;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
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)
|
// Read all the remaining bytes (workaround for #681)
|
||||||
if (input.readableBytes() > 0) {
|
if (input.readableBytes() > 0) {
|
||||||
|
@ -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.api.type.types.version.Types1_13;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -51,7 +52,7 @@ public class Chunk1_15Type extends PartialType<Chunk, ClientWorld> {
|
|||||||
sections[i] = section;
|
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)
|
// Read all the remaining bytes (workaround for #681)
|
||||||
if (input.readableBytes() > 0) {
|
if (input.readableBytes() > 0) {
|
||||||
|
@ -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.api.type.types.version.Types1_9;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
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)
|
// Read all the remaining bytes (workaround for #681)
|
||||||
if (input.readableBytes() > 0) {
|
if (input.readableBytes() > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user