Search in sources :

Example 21 with StringTag

use of com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag in project ViaBackwards by ViaVersion.

the class BlockItemPackets1_18 method registerPackets.

@Override
protected void registerPackets() {
    new RecipeRewriter1_16(protocol).registerDefaultHandler(ClientboundPackets1_18.DECLARE_RECIPES);
    registerSetCooldown(ClientboundPackets1_18.COOLDOWN);
    registerWindowItems1_17_1(ClientboundPackets1_18.WINDOW_ITEMS, Type.FLAT_VAR_INT_ITEM_ARRAY_VAR_INT, Type.FLAT_VAR_INT_ITEM);
    registerSetSlot1_17_1(ClientboundPackets1_18.SET_SLOT, Type.FLAT_VAR_INT_ITEM);
    registerEntityEquipmentArray(ClientboundPackets1_18.ENTITY_EQUIPMENT, Type.FLAT_VAR_INT_ITEM);
    registerTradeList(ClientboundPackets1_18.TRADE_LIST, Type.FLAT_VAR_INT_ITEM);
    registerAdvancements(ClientboundPackets1_18.ADVANCEMENTS, Type.FLAT_VAR_INT_ITEM);
    registerClickWindow1_17_1(ServerboundPackets1_17.CLICK_WINDOW, Type.FLAT_VAR_INT_ITEM);
    protocol.registerClientbound(ClientboundPackets1_18.EFFECT, new PacketRemapper() {

        @Override
        public void registerMap() {
            // Effect id
            map(Type.INT);
            // Location
            map(Type.POSITION1_14);
            // Data
            map(Type.INT);
            handler(wrapper -> {
                int id = wrapper.get(Type.INT, 0);
                int data = wrapper.get(Type.INT, 1);
                if (id == 1010) {
                    // Play record
                    wrapper.set(Type.INT, 1, protocol.getMappingData().getNewItemId(data));
                }
            });
        }
    });
    registerCreativeInvAction(ServerboundPackets1_17.CREATIVE_INVENTORY_ACTION, Type.FLAT_VAR_INT_ITEM);
    protocol.registerClientbound(ClientboundPackets1_18.SPAWN_PARTICLE, new PacketRemapper() {

        @Override
        public void registerMap() {
            // Particle id
            map(Type.INT);
            // Override limiter
            map(Type.BOOLEAN);
            // X
            map(Type.DOUBLE);
            // Y
            map(Type.DOUBLE);
            // Z
            map(Type.DOUBLE);
            // Offset X
            map(Type.FLOAT);
            // Offset Y
            map(Type.FLOAT);
            // Offset Z
            map(Type.FLOAT);
            // Max speed
            map(Type.FLOAT);
            // Particle Count
            map(Type.INT);
            handler(wrapper -> {
                int id = wrapper.get(Type.INT, 0);
                if (id == 3) {
                    // Block marker
                    int blockState = wrapper.read(Type.VAR_INT);
                    if (blockState == 7786) {
                        // Light block
                        wrapper.set(Type.INT, 0, 3);
                    } else {
                        // Else assume barrier block
                        wrapper.set(Type.INT, 0, 2);
                    }
                    return;
                }
                ParticleMappings mappings = protocol.getMappingData().getParticleMappings();
                if (mappings.isBlockParticle(id)) {
                    int data = wrapper.passthrough(Type.VAR_INT);
                    wrapper.set(Type.VAR_INT, 0, protocol.getMappingData().getNewBlockStateId(data));
                } else if (mappings.isItemParticle(id)) {
                    handleItemToClient(wrapper.passthrough(Type.FLAT_VAR_INT_ITEM));
                }
                int newId = protocol.getMappingData().getNewParticleId(id);
                if (newId != id) {
                    wrapper.set(Type.INT, 0, newId);
                }
            });
        }
    });
    protocol.registerClientbound(ClientboundPackets1_18.BLOCK_ENTITY_DATA, new PacketRemapper() {

        @Override
        public void registerMap() {
            map(Type.POSITION1_14);
            handler(wrapper -> {
                final int id = wrapper.read(Type.VAR_INT);
                final CompoundTag tag = wrapper.read(Type.NBT);
                final int mappedId = BlockEntityIds.mappedId(id);
                if (mappedId == -1) {
                    wrapper.cancel();
                    return;
                }
                final String identifier = protocol.getMappingData().blockEntities().get(id);
                if (identifier == null) {
                    wrapper.cancel();
                    return;
                }
                // The 1.18 server doesn't include the id and positions (x, y, z) in the NBT anymore
                // If those were the only fields on the block entity (e.g.: skull, bed), we'll receive a null NBT
                // We initialize one and add the missing fields, so it can be handled correctly down the line
                final CompoundTag newTag = tag == null ? new CompoundTag() : tag;
                final Position pos = wrapper.get(Type.POSITION1_14, 0);
                // The protocol converters downstream rely on this field, let's add it back
                newTag.put("id", new StringTag("minecraft:" + identifier));
                // Weird glitches happen with the 1.17 client and below if these fields are missing
                // Some examples are block entity models becoming invisible (e.g.: signs, banners)
                newTag.put("x", new IntTag(pos.x()));
                newTag.put("y", new IntTag(pos.y()));
                newTag.put("z", new IntTag(pos.z()));
                handleSpawner(id, newTag);
                wrapper.write(Type.UNSIGNED_BYTE, (short) mappedId);
                wrapper.write(Type.NBT, newTag);
            });
        }
    });
    protocol.registerClientbound(ClientboundPackets1_18.CHUNK_DATA, new PacketRemapper() {

        @Override
        public void registerMap() {
            handler(wrapper -> {
                final EntityTracker tracker = protocol.getEntityRewriter().tracker(wrapper.user());
                final Chunk1_18Type chunkType = new Chunk1_18Type(tracker.currentWorldSectionHeight(), MathUtil.ceilLog2(protocol.getMappingData().getBlockStateMappings().size()), MathUtil.ceilLog2(tracker.biomesSent()));
                final Chunk oldChunk = wrapper.read(chunkType);
                final ChunkSection[] sections = oldChunk.getSections();
                final BitSet mask = new BitSet(oldChunk.getSections().length);
                final int[] biomeData = new int[sections.length * ChunkSection.BIOME_SIZE];
                int biomeIndex = 0;
                for (int j = 0; j < sections.length; j++) {
                    final ChunkSection section = sections[j];
                    // Write biome palette into biome array
                    final DataPalette biomePalette = section.palette(PaletteType.BIOMES);
                    for (int i = 0; i < ChunkSection.BIOME_SIZE; i++) {
                        biomeData[biomeIndex++] = biomePalette.idAt(i);
                    }
                    // Rewrite to empty section
                    if (section.getNonAirBlocksCount() == 0) {
                        sections[j] = null;
                    } else {
                        mask.set(j);
                    }
                }
                final List<CompoundTag> blockEntityTags = new ArrayList<>(oldChunk.blockEntities().size());
                for (final BlockEntity blockEntity : oldChunk.blockEntities()) {
                    final String id = protocol.getMappingData().blockEntities().get(blockEntity.typeId());
                    if (id == null) {
                        // Shrug
                        continue;
                    }
                    final CompoundTag tag;
                    if (blockEntity.tag() != null) {
                        tag = blockEntity.tag();
                        handleSpawner(blockEntity.typeId(), tag);
                    } else {
                        tag = new CompoundTag();
                    }
                    blockEntityTags.add(tag);
                    tag.put("x", new IntTag((oldChunk.getX() << 4) + blockEntity.sectionX()));
                    tag.put("y", new IntTag(blockEntity.y()));
                    tag.put("z", new IntTag((oldChunk.getZ() << 4) + blockEntity.sectionZ()));
                    tag.put("id", new StringTag("minecraft:" + id));
                }
                final Chunk chunk = new BaseChunk(oldChunk.getX(), oldChunk.getZ(), true, false, mask, oldChunk.getSections(), biomeData, oldChunk.getHeightMap(), blockEntityTags);
                wrapper.write(new Chunk1_17Type(tracker.currentWorldSectionHeight()), chunk);
                // Create and send light packet first
                final PacketWrapper lightPacket = wrapper.create(ClientboundPackets1_17_1.UPDATE_LIGHT);
                lightPacket.write(Type.VAR_INT, chunk.getX());
                lightPacket.write(Type.VAR_INT, chunk.getZ());
                // Trust edges
                lightPacket.write(Type.BOOLEAN, wrapper.read(Type.BOOLEAN));
                // Sky light mask
                lightPacket.write(Type.LONG_ARRAY_PRIMITIVE, wrapper.read(Type.LONG_ARRAY_PRIMITIVE));
                // Block light mask
                lightPacket.write(Type.LONG_ARRAY_PRIMITIVE, wrapper.read(Type.LONG_ARRAY_PRIMITIVE));
                // Empty sky light mask
                lightPacket.write(Type.LONG_ARRAY_PRIMITIVE, wrapper.read(Type.LONG_ARRAY_PRIMITIVE));
                // Empty block light mask
                lightPacket.write(Type.LONG_ARRAY_PRIMITIVE, wrapper.read(Type.LONG_ARRAY_PRIMITIVE));
                final int skyLightLength = wrapper.read(Type.VAR_INT);
                lightPacket.write(Type.VAR_INT, skyLightLength);
                for (int i = 0; i < skyLightLength; i++) {
                    lightPacket.write(Type.BYTE_ARRAY_PRIMITIVE, wrapper.read(Type.BYTE_ARRAY_PRIMITIVE));
                }
                final int blockLightLength = wrapper.read(Type.VAR_INT);
                lightPacket.write(Type.VAR_INT, blockLightLength);
                for (int i = 0; i < blockLightLength; i++) {
                    lightPacket.write(Type.BYTE_ARRAY_PRIMITIVE, wrapper.read(Type.BYTE_ARRAY_PRIMITIVE));
                }
                lightPacket.send(Protocol1_17_1To1_18.class);
            });
        }
    });
    protocol.cancelClientbound(ClientboundPackets1_18.SET_SIMULATION_DISTANCE);
}
Also used : MathUtil(com.viaversion.viaversion.util.MathUtil) ServerboundPackets1_17(com.viaversion.viaversion.protocols.protocol1_17to1_16_4.ServerboundPackets1_17) PacketWrapper(com.viaversion.viaversion.api.protocol.packet.PacketWrapper) ArrayList(java.util.ArrayList) PacketRemapper(com.viaversion.viaversion.api.protocol.remapper.PacketRemapper) Type(com.viaversion.viaversion.api.type.Type) Chunk1_17Type(com.viaversion.viaversion.protocols.protocol1_17to1_16_4.types.Chunk1_17Type) Chunk(com.viaversion.viaversion.api.minecraft.chunks.Chunk) Protocol1_17_1To1_18(com.viaversion.viabackwards.protocol.protocol1_17_1to1_18.Protocol1_17_1To1_18) ClientboundPackets1_17_1(com.viaversion.viaversion.protocols.protocol1_17_1to1_17.ClientboundPackets1_17_1) PaletteType(com.viaversion.viaversion.api.minecraft.chunks.PaletteType) IntTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.IntTag) Chunk1_18Type(com.viaversion.viaversion.protocols.protocol1_18to1_17_1.types.Chunk1_18Type) BlockEntity(com.viaversion.viaversion.api.minecraft.blockentity.BlockEntity) Position(com.viaversion.viaversion.api.minecraft.Position) ClientboundPackets1_18(com.viaversion.viaversion.protocols.protocol1_18to1_17_1.ClientboundPackets1_18) BlockEntityIds(com.viaversion.viabackwards.protocol.protocol1_17_1to1_18.data.BlockEntityIds) BaseChunk(com.viaversion.viaversion.api.minecraft.chunks.BaseChunk) EntityTracker(com.viaversion.viaversion.api.data.entity.EntityTracker) StringTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag) DataPalette(com.viaversion.viaversion.api.minecraft.chunks.DataPalette) List(java.util.List) ItemRewriter(com.viaversion.viabackwards.api.rewriters.ItemRewriter) ParticleMappings(com.viaversion.viaversion.api.data.ParticleMappings) CompoundTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag) ChunkSection(com.viaversion.viaversion.api.minecraft.chunks.ChunkSection) BitSet(java.util.BitSet) RecipeRewriter1_16(com.viaversion.viaversion.protocols.protocol1_16to1_15_2.data.RecipeRewriter1_16) StringTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag) BaseChunk(com.viaversion.viaversion.api.minecraft.chunks.BaseChunk) Chunk1_17Type(com.viaversion.viaversion.protocols.protocol1_17to1_16_4.types.Chunk1_17Type) RecipeRewriter1_16(com.viaversion.viaversion.protocols.protocol1_16to1_15_2.data.RecipeRewriter1_16) Position(com.viaversion.viaversion.api.minecraft.Position) EntityTracker(com.viaversion.viaversion.api.data.entity.EntityTracker) PacketRemapper(com.viaversion.viaversion.api.protocol.remapper.PacketRemapper) BitSet(java.util.BitSet) Protocol1_17_1To1_18(com.viaversion.viabackwards.protocol.protocol1_17_1to1_18.Protocol1_17_1To1_18) Chunk(com.viaversion.viaversion.api.minecraft.chunks.Chunk) BaseChunk(com.viaversion.viaversion.api.minecraft.chunks.BaseChunk) DataPalette(com.viaversion.viaversion.api.minecraft.chunks.DataPalette) Chunk1_18Type(com.viaversion.viaversion.protocols.protocol1_18to1_17_1.types.Chunk1_18Type) PacketWrapper(com.viaversion.viaversion.api.protocol.packet.PacketWrapper) ArrayList(java.util.ArrayList) List(java.util.List) ParticleMappings(com.viaversion.viaversion.api.data.ParticleMappings) ChunkSection(com.viaversion.viaversion.api.minecraft.chunks.ChunkSection) CompoundTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag) IntTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.IntTag) BlockEntity(com.viaversion.viaversion.api.minecraft.blockentity.BlockEntity)

Example 22 with StringTag

use of com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag in project ViaBackwards by ViaVersion.

the class EntityPackets1_18 method registerPackets.

@Override
protected void registerPackets() {
    registerMetadataRewriter(ClientboundPackets1_18.ENTITY_METADATA, Types1_18.METADATA_LIST, Types1_17.METADATA_LIST);
    protocol.registerClientbound(ClientboundPackets1_18.JOIN_GAME, new PacketRemapper() {

        @Override
        public void registerMap() {
            // Entity ID
            map(Type.INT);
            // Hardcore
            map(Type.BOOLEAN);
            // Gamemode
            map(Type.UNSIGNED_BYTE);
            // Previous Gamemode
            map(Type.BYTE);
            // Worlds
            map(Type.STRING_ARRAY);
            // Dimension registry
            map(Type.NBT);
            // Current dimension data
            map(Type.NBT);
            // World
            map(Type.STRING);
            // Seed
            map(Type.LONG);
            // Max players
            map(Type.VAR_INT);
            // Chunk radius
            map(Type.VAR_INT);
            // Read simulation distance
            read(Type.VAR_INT);
            handler(worldDataTrackerHandler(1));
            handler(wrapper -> {
                final CompoundTag registry = wrapper.get(Type.NBT, 0);
                final CompoundTag biomeRegistry = registry.get("minecraft:worldgen/biome");
                final ListTag biomes = biomeRegistry.get("value");
                for (final Tag biome : biomes.getValue()) {
                    final CompoundTag biomeCompound = ((CompoundTag) biome).get("element");
                    final StringTag category = biomeCompound.get("category");
                    if (category.getValue().equals("mountain")) {
                        category.setValue("extreme_hills");
                    }
                    // The client just needs something
                    biomeCompound.put("depth", new FloatTag(0.125F));
                    biomeCompound.put("scale", new FloatTag(0.05F));
                }
                // Track amount of biomes sent
                tracker(wrapper.user()).setBiomesSent(biomes.size());
            });
        }
    });
    protocol.registerClientbound(ClientboundPackets1_18.RESPAWN, new PacketRemapper() {

        @Override
        public void registerMap() {
            // Dimension data
            map(Type.NBT);
            // World
            map(Type.STRING);
            handler(worldDataTrackerHandler(0));
        }
    });
}
Also used : Particle(com.viaversion.viaversion.api.type.types.Particle) ClientboundPackets1_18(com.viaversion.viaversion.protocols.protocol1_18to1_17_1.ClientboundPackets1_18) MetaType(com.viaversion.viaversion.api.minecraft.metadata.MetaType) Tag(com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag) EntityType(com.viaversion.viaversion.api.minecraft.entities.EntityType) StringTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag) ListTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.ListTag) Types1_17(com.viaversion.viaversion.api.type.types.version.Types1_17) PacketRemapper(com.viaversion.viaversion.api.protocol.remapper.PacketRemapper) Type(com.viaversion.viaversion.api.type.Type) Types1_18(com.viaversion.viaversion.api.type.types.version.Types1_18) Entity1_17Types(com.viaversion.viaversion.api.minecraft.entities.Entity1_17Types) Protocol1_17_1To1_18(com.viaversion.viabackwards.protocol.protocol1_17_1to1_18.Protocol1_17_1To1_18) CompoundTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag) EntityRewriter(com.viaversion.viabackwards.api.rewriters.EntityRewriter) FloatTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.FloatTag) StringTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag) FloatTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.FloatTag) PacketRemapper(com.viaversion.viaversion.api.protocol.remapper.PacketRemapper) Tag(com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag) StringTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag) ListTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.ListTag) CompoundTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag) FloatTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.FloatTag) ListTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.ListTag) CompoundTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag)

Example 23 with StringTag

use of com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag in project ViaBackwards by ViaVersion.

the class Protocol1_18To1_18_2 method removeTagPrefix.

private void removeTagPrefix(CompoundTag tag) {
    final Tag infiniburnTag = tag.get("infiniburn");
    if (infiniburnTag instanceof StringTag) {
        final StringTag infiniburn = (StringTag) infiniburnTag;
        infiniburn.setValue(infiniburn.getValue().substring(1));
    }
}
Also used : StringTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag) Tag(com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag) StringTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag) ListTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.ListTag) CompoundTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag)

Example 24 with StringTag

use of com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag in project ViaBackwards by ViaVersion.

the class BlockItemPackets1_16_2 method handleBlockEntity.

private void handleBlockEntity(CompoundTag tag) {
    StringTag idTag = tag.get("id");
    if (idTag == null)
        return;
    if (idTag.getValue().equals("minecraft:skull")) {
        // Workaround an old client bug: MC-68487
        Tag skullOwnerTag = tag.get("SkullOwner");
        if (!(skullOwnerTag instanceof CompoundTag))
            return;
        CompoundTag skullOwnerCompoundTag = (CompoundTag) skullOwnerTag;
        if (!skullOwnerCompoundTag.contains("Id"))
            return;
        CompoundTag properties = skullOwnerCompoundTag.get("Properties");
        if (properties == null)
            return;
        ListTag textures = properties.get("textures");
        if (textures == null)
            return;
        CompoundTag first = textures.size() > 0 ? textures.get(0) : null;
        if (first == null)
            return;
        // Make the client cache the skinprofile over this uuid
        int hashCode = first.get("Value").getValue().hashCode();
        // TODO split texture in 4 for a lower collision chance
        int[] uuidIntArray = { hashCode, 0, 0, 0 };
        skullOwnerCompoundTag.put("Id", new IntArrayTag(uuidIntArray));
    }
}
Also used : StringTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag) IntArrayTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.IntArrayTag) Tag(com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag) StringTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag) ListTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.ListTag) CompoundTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag) IntArrayTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.IntArrayTag) ListTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.ListTag) CompoundTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag)

Example 25 with StringTag

use of com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag in project ViaBackwards by ViaVersion.

the class BlockItemPackets1_14 method handleItemToClient.

@Override
public Item handleItemToClient(Item item) {
    if (item == null)
        return null;
    super.handleItemToClient(item);
    // Lore now uses JSON
    CompoundTag tag = item.tag();
    CompoundTag display;
    if (tag != null && (display = tag.get("display")) != null) {
        ListTag lore = display.get("Lore");
        if (lore != null) {
            saveListTag(display, lore, "Lore");
            for (Tag loreEntry : lore) {
                if (!(loreEntry instanceof StringTag))
                    continue;
                StringTag loreEntryTag = (StringTag) loreEntry;
                String value = loreEntryTag.getValue();
                if (value != null && !value.isEmpty()) {
                    loreEntryTag.setValue(ChatRewriter.jsonToLegacyText(value));
                }
            }
        }
    }
    enchantmentRewriter.handleToClient(item);
    return item;
}
Also used : StringTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag) ListTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.ListTag) Tag(com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag) StringTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag) CompoundTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag) ListTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.ListTag) CompoundTag(com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag)

Aggregations

StringTag (com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag)28 CompoundTag (com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag)27 Tag (com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag)22 ListTag (com.viaversion.viaversion.libs.opennbt.tag.builtin.ListTag)16 IntTag (com.viaversion.viaversion.libs.opennbt.tag.builtin.IntTag)13 ByteTag (com.viaversion.viaversion.libs.opennbt.tag.builtin.ByteTag)8 NumberTag (com.viaversion.viaversion.libs.opennbt.tag.builtin.NumberTag)7 ShortTag (com.viaversion.viaversion.libs.opennbt.tag.builtin.ShortTag)7 PacketRemapper (com.viaversion.viaversion.api.protocol.remapper.PacketRemapper)5 Type (com.viaversion.viaversion.api.type.Type)4 IntArrayTag (com.viaversion.viaversion.libs.opennbt.tag.builtin.IntArrayTag)4 ArrayList (java.util.ArrayList)4 LongArrayTag (com.viaversion.viaversion.libs.opennbt.tag.builtin.LongArrayTag)3 UUID (java.util.UUID)3 MappedLegacyBlockItem (com.viaversion.viabackwards.api.data.MappedLegacyBlockItem)2 EntityRewriter (com.viaversion.viabackwards.api.rewriters.EntityRewriter)2 Protocol1_17_1To1_18 (com.viaversion.viabackwards.protocol.protocol1_17_1to1_18.Protocol1_17_1To1_18)2 Chunk (com.viaversion.viaversion.api.minecraft.chunks.Chunk)2 Entity1_17Types (com.viaversion.viaversion.api.minecraft.entities.Entity1_17Types)2 EntityType (com.viaversion.viaversion.api.minecraft.entities.EntityType)2