diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_3to1_19_4/Protocol1_19_3To1_19_4.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_3to1_19_4/Protocol1_19_3To1_19_4.java index d25f903d..70712230 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_3to1_19_4/Protocol1_19_3To1_19_4.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_3to1_19_4/Protocol1_19_3To1_19_4.java @@ -59,7 +59,7 @@ public final class Protocol1_19_3To1_19_4 extends BackwardsProtocol soundRewriter = new SoundRewriter<>(this); soundRewriter.registerStopSound(ClientboundPackets1_19_4.STOP_SOUND); soundRewriter.register1_19_3Sound(ClientboundPackets1_19_4.SOUND); - soundRewriter.registerSound(ClientboundPackets1_19_4.ENTITY_SOUND); + soundRewriter.register1_19_3Sound(ClientboundPackets1_19_4.ENTITY_SOUND); // TODO fallback field in components translatableRewriter.registerComponentPacket(ClientboundPackets1_19_4.ACTIONBAR); diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_4to1_20/Protocol1_19_4To1_20.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_4to1_20/Protocol1_19_4To1_20.java index 1981d78f..86ee3ec6 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_4to1_20/Protocol1_19_4To1_20.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_4to1_20/Protocol1_19_4To1_20.java @@ -57,7 +57,7 @@ public final class Protocol1_19_4To1_20 extends BackwardsProtocol soundRewriter = new SoundRewriter<>(this); soundRewriter.registerStopSound(ClientboundPackets1_19_4.STOP_SOUND); soundRewriter.register1_19_3Sound(ClientboundPackets1_19_4.SOUND); - soundRewriter.registerSound(ClientboundPackets1_19_4.ENTITY_SOUND); + soundRewriter.register1_19_3Sound(ClientboundPackets1_19_4.ENTITY_SOUND); new StatisticsRewriter<>(this).register(ClientboundPackets1_19_4.STATISTICS); diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_2to1_20_3/Protocol1_20_2To1_20_3.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_2to1_20_3/Protocol1_20_2To1_20_3.java index 6a3a5fd4..9aeac118 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_2to1_20_3/Protocol1_20_2To1_20_3.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_2to1_20_3/Protocol1_20_2To1_20_3.java @@ -74,7 +74,7 @@ public final class Protocol1_20_2To1_20_3 extends BackwardsProtocol soundRewriter = new SoundRewriter<>(this); soundRewriter.register1_19_3Sound(ClientboundPackets1_20_3.SOUND); - soundRewriter.registerEntitySound(ClientboundPackets1_20_3.ENTITY_SOUND); + soundRewriter.register1_19_3Sound(ClientboundPackets1_20_3.ENTITY_SOUND); soundRewriter.registerStopSound(ClientboundPackets1_20_3.STOP_SOUND); new StatisticsRewriter<>(this).register(ClientboundPackets1_20_3.STATISTICS); diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/Protocol1_20_3To1_20_5.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/Protocol1_20_3To1_20_5.java index 6af88e89..70de7cc2 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/Protocol1_20_3To1_20_5.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/Protocol1_20_3To1_20_5.java @@ -18,67 +18,114 @@ package com.viaversion.viabackwards.protocol.protocol1_20_3to1_20_5; import com.viaversion.viabackwards.api.BackwardsProtocol; -import com.viaversion.viabackwards.api.data.BackwardsMappings; import com.viaversion.viabackwards.api.rewriters.SoundRewriter; import com.viaversion.viabackwards.api.rewriters.TranslatableRewriter; +import com.viaversion.viabackwards.protocol.protocol1_20_3to1_20_5.data.BackwardsMappings; import com.viaversion.viabackwards.protocol.protocol1_20_3to1_20_5.rewriter.BlockItemPacketRewriter1_20_5; import com.viaversion.viabackwards.protocol.protocol1_20_3to1_20_5.rewriter.EntityPacketRewriter1_20_5; +import com.viaversion.viabackwards.protocol.protocol1_20_3to1_20_5.storage.SecureChatStorage; import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_20_5; import com.viaversion.viaversion.api.protocol.packet.ClientboundPacketType; import com.viaversion.viaversion.api.protocol.packet.ServerboundPacketType; import com.viaversion.viaversion.api.protocol.packet.State; +import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.data.entity.EntityTrackerBase; +import com.viaversion.viaversion.protocols.base.ClientboundLoginPackets; import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.ServerboundConfigurationPackets1_20_2; import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ClientboundConfigurationPackets1_20_3; import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ClientboundPackets1_20_3; import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ServerboundPackets1_20_3; -import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.Protocol1_20_5To1_20_3; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundConfigurationPackets1_20_5; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundPackets1_20_5; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ServerboundConfigurationPackets1_20_5; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ServerboundPackets1_20_5; import com.viaversion.viaversion.rewriter.ComponentRewriter.ReadType; import com.viaversion.viaversion.rewriter.StatisticsRewriter; import com.viaversion.viaversion.rewriter.TagRewriter; -public final class Protocol1_20_3To1_20_5 extends BackwardsProtocol { +public final class Protocol1_20_3To1_20_5 extends BackwardsProtocol { - public static final BackwardsMappings MAPPINGS = new BackwardsMappings("1.20.5", "1.20.3", Protocol1_20_5To1_20_3.class); + public static final BackwardsMappings MAPPINGS = new BackwardsMappings(); private final EntityPacketRewriter1_20_5 entityRewriter = new EntityPacketRewriter1_20_5(this); private final BlockItemPacketRewriter1_20_5 itemRewriter = new BlockItemPacketRewriter1_20_5(this); - private final TranslatableRewriter translatableRewriter = new TranslatableRewriter<>(this, ReadType.NBT); + private final TranslatableRewriter translatableRewriter = new TranslatableRewriter<>(this, ReadType.NBT); public Protocol1_20_3To1_20_5() { - super(ClientboundPackets1_20_3.class, ClientboundPackets1_20_3.class, ServerboundPackets1_20_3.class, ServerboundPackets1_20_3.class); + super(ClientboundPackets1_20_5.class, ClientboundPackets1_20_3.class, ServerboundPackets1_20_5.class, ServerboundPackets1_20_3.class); } @Override protected void registerPackets() { super.registerPackets(); - final TagRewriter tagRewriter = new TagRewriter<>(this); - tagRewriter.registerGeneric(ClientboundPackets1_20_3.TAGS); - tagRewriter.registerGeneric(State.CONFIGURATION, ClientboundConfigurationPackets1_20_3.UPDATE_TAGS); + final TagRewriter tagRewriter = new TagRewriter<>(this); + tagRewriter.registerGeneric(ClientboundPackets1_20_5.TAGS); + tagRewriter.registerGeneric(State.CONFIGURATION, ClientboundConfigurationPackets1_20_5.UPDATE_TAGS); - final SoundRewriter soundRewriter = new SoundRewriter<>(this); - soundRewriter.register1_19_3Sound(ClientboundPackets1_20_3.SOUND); - soundRewriter.registerSound(ClientboundPackets1_20_3.ENTITY_SOUND); - soundRewriter.registerStopSound(ClientboundPackets1_20_3.STOP_SOUND); + final SoundRewriter soundRewriter = new SoundRewriter<>(this); + soundRewriter.register1_19_3Sound(ClientboundPackets1_20_5.SOUND); + soundRewriter.register1_19_3Sound(ClientboundPackets1_20_5.ENTITY_SOUND); + soundRewriter.registerStopSound(ClientboundPackets1_20_5.STOP_SOUND); - new StatisticsRewriter<>(this).register(ClientboundPackets1_20_3.STATISTICS); + new StatisticsRewriter<>(this).register(ClientboundPackets1_20_5.STATISTICS); - translatableRewriter.registerComponentPacket(ClientboundPackets1_20_3.ACTIONBAR); - translatableRewriter.registerComponentPacket(ClientboundPackets1_20_3.TITLE_TEXT); - translatableRewriter.registerComponentPacket(ClientboundPackets1_20_3.TITLE_SUBTITLE); - translatableRewriter.registerBossBar(ClientboundPackets1_20_3.BOSSBAR); - translatableRewriter.registerComponentPacket(ClientboundPackets1_20_3.DISCONNECT); - translatableRewriter.registerTabList(ClientboundPackets1_20_3.TAB_LIST); - translatableRewriter.registerCombatKill1_20(ClientboundPackets1_20_3.COMBAT_KILL); - translatableRewriter.registerComponentPacket(ClientboundPackets1_20_3.SYSTEM_CHAT); - translatableRewriter.registerComponentPacket(ClientboundPackets1_20_3.DISGUISED_CHAT); + translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.ACTIONBAR); + translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.TITLE_TEXT); + translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.TITLE_SUBTITLE); + translatableRewriter.registerBossBar(ClientboundPackets1_20_5.BOSSBAR); + translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.DISCONNECT); + translatableRewriter.registerTabList(ClientboundPackets1_20_5.TAB_LIST); + translatableRewriter.registerCombatKill1_20(ClientboundPackets1_20_5.COMBAT_KILL); + translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.SYSTEM_CHAT); + translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.DISGUISED_CHAT); translatableRewriter.registerPing(); + + + registerClientbound(State.LOGIN, ClientboundLoginPackets.HELLO, wrapper -> { + wrapper.passthrough(Type.STRING); // Server ID + wrapper.passthrough(Type.BYTE_ARRAY_PRIMITIVE); // Public key + wrapper.passthrough(Type.BYTE_ARRAY_PRIMITIVE); // Challenge + wrapper.read(Type.BOOLEAN); // Authenticate + }); + + registerClientbound(ClientboundPackets1_20_5.SERVER_DATA, wrapper -> { + wrapper.passthrough(Type.TAG); // MOTD + wrapper.passthrough(Type.OPTIONAL_BYTE_ARRAY_PRIMITIVE); // Icon + wrapper.write(Type.BOOLEAN, wrapper.user().get(SecureChatStorage.class).enforcesSecureChat()); + }); + + // TODO + registerClientbound(State.LOGIN, ClientboundLoginPackets.COOKIE_REQUEST.getId(), -1, wrapper -> { + wrapper.cancel(); + }); + registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_5.COOKIE_REQUEST.getId(), -1, wrapper -> { + wrapper.cancel(); + }); + registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_5.STORE_COOKIE.getId(), -1, wrapper -> { + wrapper.cancel(); + }); + registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_5.TRANSFER.getId(), -1, wrapper -> { + wrapper.cancel(); + }); + registerClientbound(ClientboundPackets1_20_5.COOKIE_REQUEST, null, wrapper -> { + wrapper.cancel(); + }); + registerClientbound(ClientboundPackets1_20_5.STORE_COOKIE, null, wrapper -> { + wrapper.cancel(); + }); + registerClientbound(ClientboundPackets1_20_5.TRANSFER, null, wrapper -> { + wrapper.cancel(); + }); + + registerClientboundPacketIdChanges(State.CONFIGURATION, ClientboundConfigurationPackets1_20_5.class, ClientboundConfigurationPackets1_20_3.class); + registerServerboundPacketIdChanges(State.CONFIGURATION, ServerboundConfigurationPackets1_20_2.class, ServerboundConfigurationPackets1_20_5.class); } @Override public void init(final UserConnection user) { addEntityTracker(user, new EntityTrackerBase(user, EntityTypes1_20_5.PLAYER)); + user.put(new SecureChatStorage()); } @Override @@ -97,13 +144,13 @@ public final class Protocol1_20_3To1_20_5 extends BackwardsProtocol getTranslatableRewriter() { + public TranslatableRewriter getTranslatableRewriter() { return translatableRewriter; } @Override protected ClientboundPacketType clientboundFinishConfigurationPacket() { - return ClientboundConfigurationPackets1_20_3.FINISH_CONFIGURATION; + return ClientboundConfigurationPackets1_20_5.FINISH_CONFIGURATION; } @Override diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/data/BackwardsMappings.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/data/BackwardsMappings.java new file mode 100644 index 00000000..59f68129 --- /dev/null +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/data/BackwardsMappings.java @@ -0,0 +1,50 @@ +/* + * This file is part of ViaBackwards - https://github.com/ViaVersion/ViaBackwards + * Copyright (C) 2016-2024 ViaVersion and contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.viaversion.viabackwards.protocol.protocol1_20_3to1_20_5.data; + +import com.viaversion.viabackwards.api.data.VBMappingDataLoader; +import com.viaversion.viaversion.libs.gson.JsonArray; +import com.viaversion.viaversion.libs.gson.JsonElement; +import com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.Protocol1_20_5To1_20_3; +import org.checkerframework.checker.nullness.qual.Nullable; + +public final class BackwardsMappings extends com.viaversion.viabackwards.api.data.BackwardsMappings { + + private String[] sounds; + + public BackwardsMappings() { + super("1.20.5", "1.20.3", Protocol1_20_5To1_20_3.class); + } + + @Override + protected void loadExtras(final CompoundTag data) { + super.loadExtras(data); + + final JsonArray sounds = VBMappingDataLoader.loadData("sounds-1.20.3.json").getAsJsonArray("sounds"); + this.sounds = new String[sounds.size()]; + int i = 0; + for (final JsonElement sound : sounds) { + this.sounds[i++] = sound.getAsString(); + } + } + + public @Nullable String mappedSoundName(final int mappedId) { + return mappedId >= 0 && mappedId < sounds.length ? sounds[mappedId] : null; + } +} diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java index b2c762a2..12d4a4c8 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java @@ -19,14 +19,17 @@ package com.viaversion.viabackwards.protocol.protocol1_20_3to1_20_5.rewriter; import com.viaversion.viabackwards.api.rewriters.ItemRewriter; import com.viaversion.viabackwards.protocol.protocol1_20_3to1_20_5.Protocol1_20_3To1_20_5; +import com.viaversion.viaversion.api.minecraft.Particle; import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_20_2; -import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ClientboundPackets1_20_3; +import com.viaversion.viaversion.api.type.types.version.Types1_20_3; import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ServerboundPackets1_20_3; import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.rewriter.RecipeRewriter1_20_3; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundPackets1_20_5; import com.viaversion.viaversion.rewriter.BlockRewriter; +import com.viaversion.viaversion.util.Key; -public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter { +public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter { public BlockItemPacketRewriter1_20_5(final Protocol1_20_3To1_20_5 protocol) { super(protocol, Type.ITEM1_20_2, Type.ITEM1_20_2_ARRAY); @@ -34,25 +37,109 @@ public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter blockRewriter = BlockRewriter.for1_20_2(protocol); - blockRewriter.registerBlockAction(ClientboundPackets1_20_3.BLOCK_ACTION); - blockRewriter.registerBlockChange(ClientboundPackets1_20_3.BLOCK_CHANGE); - blockRewriter.registerVarLongMultiBlockChange1_20(ClientboundPackets1_20_3.MULTI_BLOCK_CHANGE); - blockRewriter.registerEffect(ClientboundPackets1_20_3.EFFECT, 1010, 2001); - blockRewriter.registerChunkData1_19(ClientboundPackets1_20_3.CHUNK_DATA, ChunkType1_20_2::new); - blockRewriter.registerBlockEntityData(ClientboundPackets1_20_3.BLOCK_ENTITY_DATA); + final BlockRewriter blockRewriter = BlockRewriter.for1_20_2(protocol); + blockRewriter.registerBlockAction(ClientboundPackets1_20_5.BLOCK_ACTION); + blockRewriter.registerBlockChange(ClientboundPackets1_20_5.BLOCK_CHANGE); + blockRewriter.registerVarLongMultiBlockChange1_20(ClientboundPackets1_20_5.MULTI_BLOCK_CHANGE); + blockRewriter.registerEffect(ClientboundPackets1_20_5.EFFECT, 1010, 2001); + blockRewriter.registerChunkData1_19(ClientboundPackets1_20_5.CHUNK_DATA, ChunkType1_20_2::new); + blockRewriter.registerBlockEntityData(ClientboundPackets1_20_5.BLOCK_ENTITY_DATA); - registerSetCooldown(ClientboundPackets1_20_3.COOLDOWN); - registerWindowItems1_17_1(ClientboundPackets1_20_3.WINDOW_ITEMS); - registerSetSlot1_17_1(ClientboundPackets1_20_3.SET_SLOT); - registerAdvancements1_20_3(ClientboundPackets1_20_3.ADVANCEMENTS); - registerEntityEquipmentArray(ClientboundPackets1_20_3.ENTITY_EQUIPMENT); + registerSetCooldown(ClientboundPackets1_20_5.COOLDOWN); + registerWindowItems1_17_1(ClientboundPackets1_20_5.WINDOW_ITEMS); + registerSetSlot1_17_1(ClientboundPackets1_20_5.SET_SLOT); + registerAdvancements1_20_3(ClientboundPackets1_20_5.ADVANCEMENTS); + registerEntityEquipmentArray(ClientboundPackets1_20_5.ENTITY_EQUIPMENT); registerClickWindow1_17_1(ServerboundPackets1_20_3.CLICK_WINDOW); - registerTradeList1_19(ClientboundPackets1_20_3.TRADE_LIST); registerCreativeInvAction(ServerboundPackets1_20_3.CREATIVE_INVENTORY_ACTION); - registerWindowPropertyEnchantmentHandler(ClientboundPackets1_20_3.WINDOW_PROPERTY); - registerSpawnParticle1_19(ClientboundPackets1_20_3.SPAWN_PARTICLE); + registerWindowPropertyEnchantmentHandler(ClientboundPackets1_20_5.WINDOW_PROPERTY); - new RecipeRewriter1_20_3<>(protocol).register(ClientboundPackets1_20_3.DECLARE_RECIPES); + protocol.registerClientbound(ClientboundPackets1_20_5.SPAWN_PARTICLE, wrapper -> { + wrapper.write(Type.VAR_INT, 0); // Write dummy value, set later + + wrapper.passthrough(Type.BOOLEAN); // Long Distance + wrapper.passthrough(Type.DOUBLE); // X + wrapper.passthrough(Type.DOUBLE); // Y + wrapper.passthrough(Type.DOUBLE); // Z + wrapper.passthrough(Type.FLOAT); // Offset X + wrapper.passthrough(Type.FLOAT); // Offset Y + wrapper.passthrough(Type.FLOAT); // Offset Z + wrapper.passthrough(Type.FLOAT); // Particle Data + wrapper.passthrough(Type.INT); // Particle Count + + // Move it to the beginning, move out arguments here + final Particle particle = wrapper.read(Types1_20_3.PARTICLE); + rewriteParticle(particle); + wrapper.set(Type.VAR_INT, 0, particle.getId()); + for (final Particle.ParticleData argument : particle.getArguments()) { + argument.write(wrapper); + } + }); + + protocol.registerClientbound(ClientboundPackets1_20_5.EXPLOSION, wrapper -> { + wrapper.passthrough(Type.DOUBLE); // X + wrapper.passthrough(Type.DOUBLE); // Y + wrapper.passthrough(Type.DOUBLE); // Z + wrapper.passthrough(Type.FLOAT); // Power + final int blocks = wrapper.passthrough(Type.VAR_INT); + for (int i = 0; i < blocks; i++) { + wrapper.passthrough(Type.BYTE); // Relative X + wrapper.passthrough(Type.BYTE); // Relative Y + wrapper.passthrough(Type.BYTE); // Relative Z + } + wrapper.passthrough(Type.FLOAT); // Knockback X + wrapper.passthrough(Type.FLOAT); // Knockback Y + wrapper.passthrough(Type.FLOAT); // Knockback Z + wrapper.passthrough(Type.VAR_INT); // Block interaction type + + final Particle smallExplosionParticle = wrapper.passthrough(Types1_20_3.PARTICLE); + final Particle largeExplosionParticle = wrapper.passthrough(Types1_20_3.PARTICLE); + protocol.getEntityRewriter().rewriteParticle(smallExplosionParticle); + protocol.getEntityRewriter().rewriteParticle(largeExplosionParticle); + + int soundId = wrapper.read(Type.VAR_INT) - 1; + if (soundId == -1) { + // Already followed by the resource location + return; + } + + soundId = protocol.getMappingData().getSoundMappings().getNewId(soundId); + final String soundKey = protocol.getMappingData().mappedSoundName(soundId); + wrapper.write(Type.STRING, soundKey != null ? soundKey : "minecraft:entity.generic.explode"); + wrapper.write(Type.OPTIONAL_FLOAT, null); // Fixed range + }); + + protocol.registerClientbound(ClientboundPackets1_20_5.TRADE_LIST, wrapper -> { + wrapper.passthrough(Type.VAR_INT); // Container id + final int size = wrapper.passthrough(Type.VAR_INT); + for (int i = 0; i < size; i++) { + handleItemToClient(wrapper.passthrough(Type.ITEM1_20_2)); // Input + handleItemToClient(wrapper.passthrough(Type.ITEM1_20_2)); // Output + handleItemToClient(wrapper.passthrough(Type.ITEM1_20_2)); // Second Item + wrapper.passthrough(Type.BOOLEAN); // Trade disabled + wrapper.passthrough(Type.INT); // Number of tools uses + wrapper.passthrough(Type.INT); // Maximum number of trade uses + wrapper.passthrough(Type.INT); // XP + wrapper.passthrough(Type.INT); // Special price + wrapper.passthrough(Type.FLOAT); // Price multiplier + wrapper.passthrough(Type.INT); // Demand + + wrapper.read(Type.BOOLEAN); // Ignore tags + } + }); + + final RecipeRewriter1_20_3 recipeRewriter = new RecipeRewriter1_20_3<>(protocol); + protocol.registerClientbound(ClientboundPackets1_20_5.DECLARE_RECIPES, wrapper -> { + final int size = wrapper.passthrough(Type.VAR_INT); + for (int i = 0; i < size; i++) { + // Change order and write the type as an int + final String recipeIdentifier = wrapper.read(Type.STRING); + final int serializerTypeId = wrapper.read(Type.VAR_INT); + final String serializerType = protocol.getMappingData().getRecipeSerializerMappings().mappedIdentifier(serializerTypeId); + wrapper.write(Type.STRING, serializerType); + wrapper.write(Type.STRING, recipeIdentifier); + recipeRewriter.handleRecipeType(wrapper, Key.stripMinecraftNamespace(serializerType)); + } + }); } } \ No newline at end of file diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java index 144aae21..aca9eec2 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java @@ -19,6 +19,7 @@ package com.viaversion.viabackwards.protocol.protocol1_20_3to1_20_5.rewriter; import com.viaversion.viabackwards.api.rewriters.EntityRewriter; import com.viaversion.viabackwards.protocol.protocol1_20_3to1_20_5.Protocol1_20_3To1_20_5; +import com.viaversion.viabackwards.protocol.protocol1_20_3to1_20_5.storage.SecureChatStorage; import com.viaversion.viaversion.api.minecraft.entities.EntityType; import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_20_5; import com.viaversion.viaversion.api.protocol.packet.State; @@ -26,11 +27,11 @@ import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers; import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.types.version.Types1_20_3; import com.viaversion.viaversion.api.type.types.version.Types1_20_5; -import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ClientboundConfigurationPackets1_20_3; -import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ClientboundPackets1_20_3; import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.data.AttributeMappings; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundConfigurationPackets1_20_5; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundPackets1_20_5; -public final class EntityPacketRewriter1_20_5 extends EntityRewriter { +public final class EntityPacketRewriter1_20_5 extends EntityRewriter { public EntityPacketRewriter1_20_5(final Protocol1_20_3To1_20_5 protocol) { super(protocol, Types1_20_3.META_TYPES.optionalComponentType, Types1_20_3.META_TYPES.booleanType); @@ -38,11 +39,11 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter { + // Moved to server data + final boolean enforcesSecureChat = wrapper.read(Type.BOOLEAN); + wrapper.user().get(SecureChatStorage.class).setEnforcesSecureChat(enforcesSecureChat); + }); handler(worldDataTrackerHandlerByKey()); // Tracks world height and name for chunk data and entity (un)tracking } }); - protocol.registerClientbound(ClientboundPackets1_20_3.RESPAWN, new PacketHandlers() { + protocol.registerClientbound(ClientboundPackets1_20_5.RESPAWN, new PacketHandlers() { @Override public void register() { map(Type.STRING); // Dimension @@ -78,7 +90,7 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter { + protocol.registerClientbound(ClientboundPackets1_20_5.ENTITY_EFFECT, wrapper -> { wrapper.passthrough(Type.VAR_INT); // Entity ID wrapper.passthrough(Type.VAR_INT); // Effect ID wrapper.passthrough(Type.BYTE); // Amplifier @@ -87,7 +99,7 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter { + protocol.registerClientbound(ClientboundPackets1_20_5.ENTITY_PROPERTIES, wrapper -> { wrapper.passthrough(Type.VAR_INT); // Entity ID final int size = wrapper.passthrough(Type.VAR_INT); diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/storage/SecureChatStorage.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/storage/SecureChatStorage.java new file mode 100644 index 00000000..cef08c77 --- /dev/null +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/storage/SecureChatStorage.java @@ -0,0 +1,32 @@ +/* + * This file is part of ViaBackwards - https://github.com/ViaVersion/ViaBackwards + * Copyright (C) 2016-2024 ViaVersion and contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.viaversion.viabackwards.protocol.protocol1_20_3to1_20_5.storage; + +import com.viaversion.viaversion.api.connection.StorableObject; + +public final class SecureChatStorage implements StorableObject { + private boolean enforcesSecureChat; + + public void setEnforcesSecureChat(final boolean enforcesSecureChat) { + this.enforcesSecureChat = enforcesSecureChat; + } + + public boolean enforcesSecureChat() { + return enforcesSecureChat; + } +} diff --git a/common/src/main/resources/assets/viabackwards/data/mappings-1.20.5to1.20.3.nbt b/common/src/main/resources/assets/viabackwards/data/mappings-1.20.5to1.20.3.nbt index 422c61f1..cc795811 100644 Binary files a/common/src/main/resources/assets/viabackwards/data/mappings-1.20.5to1.20.3.nbt and b/common/src/main/resources/assets/viabackwards/data/mappings-1.20.5to1.20.3.nbt differ diff --git a/common/src/main/resources/assets/viabackwards/data/sounds-1.20.3.json b/common/src/main/resources/assets/viabackwards/data/sounds-1.20.3.json new file mode 100644 index 00000000..6f401f73 --- /dev/null +++ b/common/src/main/resources/assets/viabackwards/data/sounds-1.20.3.json @@ -0,0 +1,1543 @@ +{ + "sounds": [ + "entity.allay.ambient_with_item", + "entity.allay.ambient_without_item", + "entity.allay.death", + "entity.allay.hurt", + "entity.allay.item_given", + "entity.allay.item_taken", + "entity.allay.item_thrown", + "ambient.cave", + "ambient.basalt_deltas.additions", + "ambient.basalt_deltas.loop", + "ambient.basalt_deltas.mood", + "ambient.crimson_forest.additions", + "ambient.crimson_forest.loop", + "ambient.crimson_forest.mood", + "ambient.nether_wastes.additions", + "ambient.nether_wastes.loop", + "ambient.nether_wastes.mood", + "ambient.soul_sand_valley.additions", + "ambient.soul_sand_valley.loop", + "ambient.soul_sand_valley.mood", + "ambient.warped_forest.additions", + "ambient.warped_forest.loop", + "ambient.warped_forest.mood", + "ambient.underwater.enter", + "ambient.underwater.exit", + "ambient.underwater.loop", + "ambient.underwater.loop.additions", + "ambient.underwater.loop.additions.rare", + "ambient.underwater.loop.additions.ultra_rare", + "block.amethyst_block.break", + "block.amethyst_block.chime", + "block.amethyst_block.fall", + "block.amethyst_block.hit", + "block.amethyst_block.place", + "block.amethyst_block.resonate", + "block.amethyst_block.step", + "block.amethyst_cluster.break", + "block.amethyst_cluster.fall", + "block.amethyst_cluster.hit", + "block.amethyst_cluster.place", + "block.amethyst_cluster.step", + "block.ancient_debris.break", + "block.ancient_debris.step", + "block.ancient_debris.place", + "block.ancient_debris.hit", + "block.ancient_debris.fall", + "block.anvil.break", + "block.anvil.destroy", + "block.anvil.fall", + "block.anvil.hit", + "block.anvil.land", + "block.anvil.place", + "block.anvil.step", + "block.anvil.use", + "item.armor.equip_chain", + "item.armor.equip_diamond", + "item.armor.equip_elytra", + "item.armor.equip_generic", + "item.armor.equip_gold", + "item.armor.equip_iron", + "item.armor.equip_leather", + "item.armor.equip_netherite", + "item.armor.equip_turtle", + "entity.armor_stand.break", + "entity.armor_stand.fall", + "entity.armor_stand.hit", + "entity.armor_stand.place", + "entity.arrow.hit", + "entity.arrow.hit_player", + "entity.arrow.shoot", + "item.axe.strip", + "item.axe.scrape", + "item.axe.wax_off", + "entity.axolotl.attack", + "entity.axolotl.death", + "entity.axolotl.hurt", + "entity.axolotl.idle_air", + "entity.axolotl.idle_water", + "entity.axolotl.splash", + "entity.axolotl.swim", + "block.azalea.break", + "block.azalea.fall", + "block.azalea.hit", + "block.azalea.place", + "block.azalea.step", + "block.azalea_leaves.break", + "block.azalea_leaves.fall", + "block.azalea_leaves.hit", + "block.azalea_leaves.place", + "block.azalea_leaves.step", + "block.bamboo.break", + "block.bamboo.fall", + "block.bamboo.hit", + "block.bamboo.place", + "block.bamboo.step", + "block.bamboo_sapling.break", + "block.bamboo_sapling.hit", + "block.bamboo_sapling.place", + "block.bamboo_wood.break", + "block.bamboo_wood.fall", + "block.bamboo_wood.hit", + "block.bamboo_wood.place", + "block.bamboo_wood.step", + "block.bamboo_wood_door.close", + "block.bamboo_wood_door.open", + "block.bamboo_wood_trapdoor.close", + "block.bamboo_wood_trapdoor.open", + "block.bamboo_wood_button.click_off", + "block.bamboo_wood_button.click_on", + "block.bamboo_wood_pressure_plate.click_off", + "block.bamboo_wood_pressure_plate.click_on", + "block.bamboo_wood_fence_gate.close", + "block.bamboo_wood_fence_gate.open", + "block.barrel.close", + "block.barrel.open", + "block.basalt.break", + "block.basalt.step", + "block.basalt.place", + "block.basalt.hit", + "block.basalt.fall", + "entity.bat.ambient", + "entity.bat.death", + "entity.bat.hurt", + "entity.bat.loop", + "entity.bat.takeoff", + "block.beacon.activate", + "block.beacon.ambient", + "block.beacon.deactivate", + "block.beacon.power_select", + "entity.bee.death", + "entity.bee.hurt", + "entity.bee.loop_aggressive", + "entity.bee.loop", + "entity.bee.sting", + "entity.bee.pollinate", + "block.beehive.drip", + "block.beehive.enter", + "block.beehive.exit", + "block.beehive.shear", + "block.beehive.work", + "block.bell.use", + "block.bell.resonate", + "block.big_dripleaf.break", + "block.big_dripleaf.fall", + "block.big_dripleaf.hit", + "block.big_dripleaf.place", + "block.big_dripleaf.step", + "entity.blaze.ambient", + "entity.blaze.burn", + "entity.blaze.death", + "entity.blaze.hurt", + "entity.blaze.shoot", + "entity.boat.paddle_land", + "entity.boat.paddle_water", + "block.bone_block.break", + "block.bone_block.fall", + "block.bone_block.hit", + "block.bone_block.place", + "block.bone_block.step", + "item.bone_meal.use", + "item.book.page_turn", + "item.book.put", + "block.blastfurnace.fire_crackle", + "item.bottle.empty", + "item.bottle.fill", + "item.bottle.fill_dragonbreath", + "entity.breeze.inhale", + "entity.breeze.idle_ground", + "entity.breeze.idle_air", + "entity.breeze.shoot", + "entity.breeze.jump", + "entity.breeze.land", + "entity.breeze.slide", + "entity.breeze.death", + "entity.breeze.hurt", + "block.brewing_stand.brew", + "item.brush.brushing.generic", + "item.brush.brushing.sand", + "item.brush.brushing.gravel", + "item.brush.brushing.sand.complete", + "item.brush.brushing.gravel.complete", + "block.bubble_column.bubble_pop", + "block.bubble_column.upwards_ambient", + "block.bubble_column.upwards_inside", + "block.bubble_column.whirlpool_ambient", + "block.bubble_column.whirlpool_inside", + "item.bucket.empty", + "item.bucket.empty_axolotl", + "item.bucket.empty_fish", + "item.bucket.empty_lava", + "item.bucket.empty_powder_snow", + "item.bucket.empty_tadpole", + "item.bucket.fill", + "item.bucket.fill_axolotl", + "item.bucket.fill_fish", + "item.bucket.fill_lava", + "item.bucket.fill_powder_snow", + "item.bucket.fill_tadpole", + "item.bundle.drop_contents", + "item.bundle.insert", + "item.bundle.remove_one", + "block.cake.add_candle", + "block.calcite.break", + "block.calcite.step", + "block.calcite.place", + "block.calcite.hit", + "block.calcite.fall", + "entity.camel.ambient", + "entity.camel.dash", + "entity.camel.dash_ready", + "entity.camel.death", + "entity.camel.eat", + "entity.camel.hurt", + "entity.camel.saddle", + "entity.camel.sit", + "entity.camel.stand", + "entity.camel.step", + "entity.camel.step_sand", + "block.campfire.crackle", + "block.candle.ambient", + "block.candle.break", + "block.candle.extinguish", + "block.candle.fall", + "block.candle.hit", + "block.candle.place", + "block.candle.step", + "entity.cat.ambient", + "entity.cat.stray_ambient", + "entity.cat.death", + "entity.cat.eat", + "entity.cat.hiss", + "entity.cat.beg_for_food", + "entity.cat.hurt", + "entity.cat.purr", + "entity.cat.purreow", + "block.cave_vines.break", + "block.cave_vines.fall", + "block.cave_vines.hit", + "block.cave_vines.place", + "block.cave_vines.step", + "block.cave_vines.pick_berries", + "block.chain.break", + "block.chain.fall", + "block.chain.hit", + "block.chain.place", + "block.chain.step", + "block.cherry_wood.break", + "block.cherry_wood.fall", + "block.cherry_wood.hit", + "block.cherry_wood.place", + "block.cherry_wood.step", + "block.cherry_sapling.break", + "block.cherry_sapling.fall", + "block.cherry_sapling.hit", + "block.cherry_sapling.place", + "block.cherry_sapling.step", + "block.cherry_leaves.break", + "block.cherry_leaves.fall", + "block.cherry_leaves.hit", + "block.cherry_leaves.place", + "block.cherry_leaves.step", + "block.cherry_wood_hanging_sign.step", + "block.cherry_wood_hanging_sign.break", + "block.cherry_wood_hanging_sign.fall", + "block.cherry_wood_hanging_sign.hit", + "block.cherry_wood_hanging_sign.place", + "block.cherry_wood_door.close", + "block.cherry_wood_door.open", + "block.cherry_wood_trapdoor.close", + "block.cherry_wood_trapdoor.open", + "block.cherry_wood_button.click_off", + "block.cherry_wood_button.click_on", + "block.cherry_wood_pressure_plate.click_off", + "block.cherry_wood_pressure_plate.click_on", + "block.cherry_wood_fence_gate.close", + "block.cherry_wood_fence_gate.open", + "block.chest.close", + "block.chest.locked", + "block.chest.open", + "entity.chicken.ambient", + "entity.chicken.death", + "entity.chicken.egg", + "entity.chicken.hurt", + "entity.chicken.step", + "block.chiseled_bookshelf.break", + "block.chiseled_bookshelf.fall", + "block.chiseled_bookshelf.hit", + "block.chiseled_bookshelf.insert", + "block.chiseled_bookshelf.insert.enchanted", + "block.chiseled_bookshelf.step", + "block.chiseled_bookshelf.pickup", + "block.chiseled_bookshelf.pickup.enchanted", + "block.chiseled_bookshelf.place", + "block.chorus_flower.death", + "block.chorus_flower.grow", + "item.chorus_fruit.teleport", + "entity.cod.ambient", + "entity.cod.death", + "entity.cod.flop", + "entity.cod.hurt", + "block.comparator.click", + "block.composter.empty", + "block.composter.fill", + "block.composter.fill_success", + "block.composter.ready", + "block.conduit.activate", + "block.conduit.ambient", + "block.conduit.ambient.short", + "block.conduit.attack.target", + "block.conduit.deactivate", + "block.copper_bulb.break", + "block.copper_bulb.step", + "block.copper_bulb.place", + "block.copper_bulb.hit", + "block.copper_bulb.fall", + "block.copper_bulb.turn_on", + "block.copper_bulb.turn_off", + "block.copper.break", + "block.copper.step", + "block.copper.place", + "block.copper.hit", + "block.copper.fall", + "block.copper_door.close", + "block.copper_door.open", + "block.copper_grate.break", + "block.copper_grate.step", + "block.copper_grate.place", + "block.copper_grate.hit", + "block.copper_grate.fall", + "block.copper_trapdoor.close", + "block.copper_trapdoor.open", + "block.coral_block.break", + "block.coral_block.fall", + "block.coral_block.hit", + "block.coral_block.place", + "block.coral_block.step", + "entity.cow.ambient", + "entity.cow.death", + "entity.cow.hurt", + "entity.cow.milk", + "entity.cow.step", + "block.crafter.craft", + "block.crafter.fail", + "entity.creeper.death", + "entity.creeper.hurt", + "entity.creeper.primed", + "block.crop.break", + "item.crop.plant", + "item.crossbow.hit", + "item.crossbow.loading_end", + "item.crossbow.loading_middle", + "item.crossbow.loading_start", + "item.crossbow.quick_charge_1", + "item.crossbow.quick_charge_2", + "item.crossbow.quick_charge_3", + "item.crossbow.shoot", + "block.decorated_pot.break", + "block.decorated_pot.fall", + "block.decorated_pot.hit", + "block.decorated_pot.insert", + "block.decorated_pot.insert_fail", + "block.decorated_pot.step", + "block.decorated_pot.place", + "block.decorated_pot.shatter", + "block.deepslate_bricks.break", + "block.deepslate_bricks.fall", + "block.deepslate_bricks.hit", + "block.deepslate_bricks.place", + "block.deepslate_bricks.step", + "block.deepslate.break", + "block.deepslate.fall", + "block.deepslate.hit", + "block.deepslate.place", + "block.deepslate.step", + "block.deepslate_tiles.break", + "block.deepslate_tiles.fall", + "block.deepslate_tiles.hit", + "block.deepslate_tiles.place", + "block.deepslate_tiles.step", + "block.dispenser.dispense", + "block.dispenser.fail", + "block.dispenser.launch", + "entity.dolphin.ambient", + "entity.dolphin.ambient_water", + "entity.dolphin.attack", + "entity.dolphin.death", + "entity.dolphin.eat", + "entity.dolphin.hurt", + "entity.dolphin.jump", + "entity.dolphin.play", + "entity.dolphin.splash", + "entity.dolphin.swim", + "entity.donkey.ambient", + "entity.donkey.angry", + "entity.donkey.chest", + "entity.donkey.death", + "entity.donkey.eat", + "entity.donkey.hurt", + "block.dripstone_block.break", + "block.dripstone_block.step", + "block.dripstone_block.place", + "block.dripstone_block.hit", + "block.dripstone_block.fall", + "block.pointed_dripstone.break", + "block.pointed_dripstone.step", + "block.pointed_dripstone.place", + "block.pointed_dripstone.hit", + "block.pointed_dripstone.fall", + "block.pointed_dripstone.land", + "block.pointed_dripstone.drip_lava", + "block.pointed_dripstone.drip_water", + "block.pointed_dripstone.drip_lava_into_cauldron", + "block.pointed_dripstone.drip_water_into_cauldron", + "block.big_dripleaf.tilt_down", + "block.big_dripleaf.tilt_up", + "entity.drowned.ambient", + "entity.drowned.ambient_water", + "entity.drowned.death", + "entity.drowned.death_water", + "entity.drowned.hurt", + "entity.drowned.hurt_water", + "entity.drowned.shoot", + "entity.drowned.step", + "entity.drowned.swim", + "item.dye.use", + "entity.egg.throw", + "entity.elder_guardian.ambient", + "entity.elder_guardian.ambient_land", + "entity.elder_guardian.curse", + "entity.elder_guardian.death", + "entity.elder_guardian.death_land", + "entity.elder_guardian.flop", + "entity.elder_guardian.hurt", + "entity.elder_guardian.hurt_land", + "item.elytra.flying", + "block.enchantment_table.use", + "block.ender_chest.close", + "block.ender_chest.open", + "entity.ender_dragon.ambient", + "entity.ender_dragon.death", + "entity.dragon_fireball.explode", + "entity.ender_dragon.flap", + "entity.ender_dragon.growl", + "entity.ender_dragon.hurt", + "entity.ender_dragon.shoot", + "entity.ender_eye.death", + "entity.ender_eye.launch", + "entity.enderman.ambient", + "entity.enderman.death", + "entity.enderman.hurt", + "entity.enderman.scream", + "entity.enderman.stare", + "entity.enderman.teleport", + "entity.endermite.ambient", + "entity.endermite.death", + "entity.endermite.hurt", + "entity.endermite.step", + "entity.ender_pearl.throw", + "block.end_gateway.spawn", + "block.end_portal_frame.fill", + "block.end_portal.spawn", + "entity.evoker.ambient", + "entity.evoker.cast_spell", + "entity.evoker.celebrate", + "entity.evoker.death", + "entity.evoker_fangs.attack", + "entity.evoker.hurt", + "entity.evoker.prepare_attack", + "entity.evoker.prepare_summon", + "entity.evoker.prepare_wololo", + "entity.experience_bottle.throw", + "entity.experience_orb.pickup", + "block.fence_gate.close", + "block.fence_gate.open", + "item.firecharge.use", + "entity.firework_rocket.blast", + "entity.firework_rocket.blast_far", + "entity.firework_rocket.large_blast", + "entity.firework_rocket.large_blast_far", + "entity.firework_rocket.launch", + "entity.firework_rocket.shoot", + "entity.firework_rocket.twinkle", + "entity.firework_rocket.twinkle_far", + "block.fire.ambient", + "block.fire.extinguish", + "entity.fish.swim", + "entity.fishing_bobber.retrieve", + "entity.fishing_bobber.splash", + "entity.fishing_bobber.throw", + "item.flintandsteel.use", + "block.flowering_azalea.break", + "block.flowering_azalea.fall", + "block.flowering_azalea.hit", + "block.flowering_azalea.place", + "block.flowering_azalea.step", + "entity.fox.aggro", + "entity.fox.ambient", + "entity.fox.bite", + "entity.fox.death", + "entity.fox.eat", + "entity.fox.hurt", + "entity.fox.screech", + "entity.fox.sleep", + "entity.fox.sniff", + "entity.fox.spit", + "entity.fox.teleport", + "block.suspicious_sand.break", + "block.suspicious_sand.step", + "block.suspicious_sand.place", + "block.suspicious_sand.hit", + "block.suspicious_sand.fall", + "block.suspicious_gravel.break", + "block.suspicious_gravel.step", + "block.suspicious_gravel.place", + "block.suspicious_gravel.hit", + "block.suspicious_gravel.fall", + "block.froglight.break", + "block.froglight.fall", + "block.froglight.hit", + "block.froglight.place", + "block.froglight.step", + "block.frogspawn.step", + "block.frogspawn.break", + "block.frogspawn.fall", + "block.frogspawn.hatch", + "block.frogspawn.hit", + "block.frogspawn.place", + "entity.frog.ambient", + "entity.frog.death", + "entity.frog.eat", + "entity.frog.hurt", + "entity.frog.lay_spawn", + "entity.frog.long_jump", + "entity.frog.step", + "entity.frog.tongue", + "block.roots.break", + "block.roots.step", + "block.roots.place", + "block.roots.hit", + "block.roots.fall", + "block.furnace.fire_crackle", + "entity.generic.big_fall", + "entity.generic.burn", + "entity.generic.death", + "entity.generic.drink", + "entity.generic.eat", + "entity.generic.explode", + "entity.generic.extinguish_fire", + "entity.generic.hurt", + "entity.generic.small_fall", + "entity.generic.splash", + "entity.generic.swim", + "entity.ghast.ambient", + "entity.ghast.death", + "entity.ghast.hurt", + "entity.ghast.scream", + "entity.ghast.shoot", + "entity.ghast.warn", + "block.gilded_blackstone.break", + "block.gilded_blackstone.fall", + "block.gilded_blackstone.hit", + "block.gilded_blackstone.place", + "block.gilded_blackstone.step", + "block.glass.break", + "block.glass.fall", + "block.glass.hit", + "block.glass.place", + "block.glass.step", + "item.glow_ink_sac.use", + "entity.glow_item_frame.add_item", + "entity.glow_item_frame.break", + "entity.glow_item_frame.place", + "entity.glow_item_frame.remove_item", + "entity.glow_item_frame.rotate_item", + "entity.glow_squid.ambient", + "entity.glow_squid.death", + "entity.glow_squid.hurt", + "entity.glow_squid.squirt", + "entity.goat.ambient", + "entity.goat.death", + "entity.goat.eat", + "entity.goat.hurt", + "entity.goat.long_jump", + "entity.goat.milk", + "entity.goat.prepare_ram", + "entity.goat.ram_impact", + "entity.goat.horn_break", + "item.goat_horn.play", + "entity.goat.screaming.ambient", + "entity.goat.screaming.death", + "entity.goat.screaming.eat", + "entity.goat.screaming.hurt", + "entity.goat.screaming.long_jump", + "entity.goat.screaming.milk", + "entity.goat.screaming.prepare_ram", + "entity.goat.screaming.ram_impact", + "entity.goat.screaming.horn_break", + "entity.goat.step", + "block.grass.break", + "block.grass.fall", + "block.grass.hit", + "block.grass.place", + "block.grass.step", + "block.gravel.break", + "block.gravel.fall", + "block.gravel.hit", + "block.gravel.place", + "block.gravel.step", + "block.grindstone.use", + "block.growing_plant.crop", + "entity.guardian.ambient", + "entity.guardian.ambient_land", + "entity.guardian.attack", + "entity.guardian.death", + "entity.guardian.death_land", + "entity.guardian.flop", + "entity.guardian.hurt", + "entity.guardian.hurt_land", + "block.hanging_roots.break", + "block.hanging_roots.fall", + "block.hanging_roots.hit", + "block.hanging_roots.place", + "block.hanging_roots.step", + "block.hanging_sign.step", + "block.hanging_sign.break", + "block.hanging_sign.fall", + "block.hanging_sign.hit", + "block.hanging_sign.place", + "block.nether_wood_hanging_sign.step", + "block.nether_wood_hanging_sign.break", + "block.nether_wood_hanging_sign.fall", + "block.nether_wood_hanging_sign.hit", + "block.nether_wood_hanging_sign.place", + "block.bamboo_wood_hanging_sign.step", + "block.bamboo_wood_hanging_sign.break", + "block.bamboo_wood_hanging_sign.fall", + "block.bamboo_wood_hanging_sign.hit", + "block.bamboo_wood_hanging_sign.place", + "block.trial_spawner.break", + "block.trial_spawner.step", + "block.trial_spawner.place", + "block.trial_spawner.hit", + "block.trial_spawner.fall", + "block.trial_spawner.spawn_mob", + "block.trial_spawner.detect_player", + "block.trial_spawner.ambient", + "block.trial_spawner.open_shutter", + "block.trial_spawner.close_shutter", + "block.trial_spawner.eject_item", + "item.hoe.till", + "entity.hoglin.ambient", + "entity.hoglin.angry", + "entity.hoglin.attack", + "entity.hoglin.converted_to_zombified", + "entity.hoglin.death", + "entity.hoglin.hurt", + "entity.hoglin.retreat", + "entity.hoglin.step", + "block.honey_block.break", + "block.honey_block.fall", + "block.honey_block.hit", + "block.honey_block.place", + "block.honey_block.slide", + "block.honey_block.step", + "item.honeycomb.wax_on", + "item.honey_bottle.drink", + "item.goat_horn.sound.0", + "item.goat_horn.sound.1", + "item.goat_horn.sound.2", + "item.goat_horn.sound.3", + "item.goat_horn.sound.4", + "item.goat_horn.sound.5", + "item.goat_horn.sound.6", + "item.goat_horn.sound.7", + "entity.horse.ambient", + "entity.horse.angry", + "entity.horse.armor", + "entity.horse.breathe", + "entity.horse.death", + "entity.horse.eat", + "entity.horse.gallop", + "entity.horse.hurt", + "entity.horse.jump", + "entity.horse.land", + "entity.horse.saddle", + "entity.horse.step", + "entity.horse.step_wood", + "entity.hostile.big_fall", + "entity.hostile.death", + "entity.hostile.hurt", + "entity.hostile.small_fall", + "entity.hostile.splash", + "entity.hostile.swim", + "entity.husk.ambient", + "entity.husk.converted_to_zombie", + "entity.husk.death", + "entity.husk.hurt", + "entity.husk.step", + "entity.illusioner.ambient", + "entity.illusioner.cast_spell", + "entity.illusioner.death", + "entity.illusioner.hurt", + "entity.illusioner.mirror_move", + "entity.illusioner.prepare_blindness", + "entity.illusioner.prepare_mirror", + "item.ink_sac.use", + "block.iron_door.close", + "block.iron_door.open", + "entity.iron_golem.attack", + "entity.iron_golem.damage", + "entity.iron_golem.death", + "entity.iron_golem.hurt", + "entity.iron_golem.repair", + "entity.iron_golem.step", + "block.iron_trapdoor.close", + "block.iron_trapdoor.open", + "entity.item_frame.add_item", + "entity.item_frame.break", + "entity.item_frame.place", + "entity.item_frame.remove_item", + "entity.item_frame.rotate_item", + "entity.item.break", + "entity.item.pickup", + "block.ladder.break", + "block.ladder.fall", + "block.ladder.hit", + "block.ladder.place", + "block.ladder.step", + "block.lantern.break", + "block.lantern.fall", + "block.lantern.hit", + "block.lantern.place", + "block.lantern.step", + "block.large_amethyst_bud.break", + "block.large_amethyst_bud.place", + "block.lava.ambient", + "block.lava.extinguish", + "block.lava.pop", + "entity.leash_knot.break", + "entity.leash_knot.place", + "block.lever.click", + "entity.lightning_bolt.impact", + "entity.lightning_bolt.thunder", + "entity.lingering_potion.throw", + "entity.llama.ambient", + "entity.llama.angry", + "entity.llama.chest", + "entity.llama.death", + "entity.llama.eat", + "entity.llama.hurt", + "entity.llama.spit", + "entity.llama.step", + "entity.llama.swag", + "entity.magma_cube.death_small", + "block.lodestone.break", + "block.lodestone.step", + "block.lodestone.place", + "block.lodestone.hit", + "block.lodestone.fall", + "item.lodestone_compass.lock", + "entity.magma_cube.death", + "entity.magma_cube.hurt", + "entity.magma_cube.hurt_small", + "entity.magma_cube.jump", + "entity.magma_cube.squish", + "entity.magma_cube.squish_small", + "block.mangrove_roots.break", + "block.mangrove_roots.fall", + "block.mangrove_roots.hit", + "block.mangrove_roots.place", + "block.mangrove_roots.step", + "block.medium_amethyst_bud.break", + "block.medium_amethyst_bud.place", + "block.metal.break", + "block.metal.fall", + "block.metal.hit", + "block.metal.place", + "block.metal_pressure_plate.click_off", + "block.metal_pressure_plate.click_on", + "block.metal.step", + "entity.minecart.inside.underwater", + "entity.minecart.inside", + "entity.minecart.riding", + "entity.mooshroom.convert", + "entity.mooshroom.eat", + "entity.mooshroom.milk", + "entity.mooshroom.suspicious_milk", + "entity.mooshroom.shear", + "block.moss_carpet.break", + "block.moss_carpet.fall", + "block.moss_carpet.hit", + "block.moss_carpet.place", + "block.moss_carpet.step", + "block.pink_petals.break", + "block.pink_petals.fall", + "block.pink_petals.hit", + "block.pink_petals.place", + "block.pink_petals.step", + "block.moss.break", + "block.moss.fall", + "block.moss.hit", + "block.moss.place", + "block.moss.step", + "block.mud.break", + "block.mud.fall", + "block.mud.hit", + "block.mud.place", + "block.mud.step", + "block.mud_bricks.break", + "block.mud_bricks.fall", + "block.mud_bricks.hit", + "block.mud_bricks.place", + "block.mud_bricks.step", + "block.muddy_mangrove_roots.break", + "block.muddy_mangrove_roots.fall", + "block.muddy_mangrove_roots.hit", + "block.muddy_mangrove_roots.place", + "block.muddy_mangrove_roots.step", + "entity.mule.ambient", + "entity.mule.angry", + "entity.mule.chest", + "entity.mule.death", + "entity.mule.eat", + "entity.mule.hurt", + "music.creative", + "music.credits", + "music_disc.5", + "music_disc.11", + "music_disc.13", + "music_disc.blocks", + "music_disc.cat", + "music_disc.chirp", + "music_disc.far", + "music_disc.mall", + "music_disc.mellohi", + "music_disc.pigstep", + "music_disc.stal", + "music_disc.strad", + "music_disc.wait", + "music_disc.ward", + "music_disc.otherside", + "music_disc.relic", + "music.dragon", + "music.end", + "music.game", + "music.menu", + "music.nether.basalt_deltas", + "music.nether.crimson_forest", + "music.overworld.deep_dark", + "music.overworld.dripstone_caves", + "music.overworld.grove", + "music.overworld.jagged_peaks", + "music.overworld.lush_caves", + "music.overworld.swamp", + "music.overworld.forest", + "music.overworld.old_growth_taiga", + "music.overworld.meadow", + "music.overworld.cherry_grove", + "music.nether.nether_wastes", + "music.overworld.frozen_peaks", + "music.overworld.snowy_slopes", + "music.nether.soul_sand_valley", + "music.overworld.stony_peaks", + "music.nether.warped_forest", + "music.overworld.flower_forest", + "music.overworld.desert", + "music.overworld.badlands", + "music.overworld.jungle", + "music.overworld.sparse_jungle", + "music.overworld.bamboo_jungle", + "music.under_water", + "block.nether_bricks.break", + "block.nether_bricks.step", + "block.nether_bricks.place", + "block.nether_bricks.hit", + "block.nether_bricks.fall", + "block.nether_wart.break", + "item.nether_wart.plant", + "block.nether_wood.break", + "block.nether_wood.fall", + "block.nether_wood.hit", + "block.nether_wood.place", + "block.nether_wood.step", + "block.nether_wood_door.close", + "block.nether_wood_door.open", + "block.nether_wood_trapdoor.close", + "block.nether_wood_trapdoor.open", + "block.nether_wood_button.click_off", + "block.nether_wood_button.click_on", + "block.nether_wood_pressure_plate.click_off", + "block.nether_wood_pressure_plate.click_on", + "block.nether_wood_fence_gate.close", + "block.nether_wood_fence_gate.open", + "intentionally_empty", + "block.packed_mud.break", + "block.packed_mud.fall", + "block.packed_mud.hit", + "block.packed_mud.place", + "block.packed_mud.step", + "block.stem.break", + "block.stem.step", + "block.stem.place", + "block.stem.hit", + "block.stem.fall", + "block.nylium.break", + "block.nylium.step", + "block.nylium.place", + "block.nylium.hit", + "block.nylium.fall", + "block.nether_sprouts.break", + "block.nether_sprouts.step", + "block.nether_sprouts.place", + "block.nether_sprouts.hit", + "block.nether_sprouts.fall", + "block.fungus.break", + "block.fungus.step", + "block.fungus.place", + "block.fungus.hit", + "block.fungus.fall", + "block.weeping_vines.break", + "block.weeping_vines.step", + "block.weeping_vines.place", + "block.weeping_vines.hit", + "block.weeping_vines.fall", + "block.wart_block.break", + "block.wart_block.step", + "block.wart_block.place", + "block.wart_block.hit", + "block.wart_block.fall", + "block.netherite_block.break", + "block.netherite_block.step", + "block.netherite_block.place", + "block.netherite_block.hit", + "block.netherite_block.fall", + "block.netherrack.break", + "block.netherrack.step", + "block.netherrack.place", + "block.netherrack.hit", + "block.netherrack.fall", + "block.note_block.basedrum", + "block.note_block.bass", + "block.note_block.bell", + "block.note_block.chime", + "block.note_block.flute", + "block.note_block.guitar", + "block.note_block.harp", + "block.note_block.hat", + "block.note_block.pling", + "block.note_block.snare", + "block.note_block.xylophone", + "block.note_block.iron_xylophone", + "block.note_block.cow_bell", + "block.note_block.didgeridoo", + "block.note_block.bit", + "block.note_block.banjo", + "block.note_block.imitate.zombie", + "block.note_block.imitate.skeleton", + "block.note_block.imitate.creeper", + "block.note_block.imitate.ender_dragon", + "block.note_block.imitate.wither_skeleton", + "block.note_block.imitate.piglin", + "entity.ocelot.hurt", + "entity.ocelot.ambient", + "entity.ocelot.death", + "entity.painting.break", + "entity.painting.place", + "entity.panda.pre_sneeze", + "entity.panda.sneeze", + "entity.panda.ambient", + "entity.panda.death", + "entity.panda.eat", + "entity.panda.step", + "entity.panda.cant_breed", + "entity.panda.aggressive_ambient", + "entity.panda.worried_ambient", + "entity.panda.hurt", + "entity.panda.bite", + "entity.parrot.ambient", + "entity.parrot.death", + "entity.parrot.eat", + "entity.parrot.fly", + "entity.parrot.hurt", + "entity.parrot.imitate.blaze", + "entity.parrot.imitate.breeze", + "entity.parrot.imitate.creeper", + "entity.parrot.imitate.drowned", + "entity.parrot.imitate.elder_guardian", + "entity.parrot.imitate.ender_dragon", + "entity.parrot.imitate.endermite", + "entity.parrot.imitate.evoker", + "entity.parrot.imitate.ghast", + "entity.parrot.imitate.guardian", + "entity.parrot.imitate.hoglin", + "entity.parrot.imitate.husk", + "entity.parrot.imitate.illusioner", + "entity.parrot.imitate.magma_cube", + "entity.parrot.imitate.phantom", + "entity.parrot.imitate.piglin", + "entity.parrot.imitate.piglin_brute", + "entity.parrot.imitate.pillager", + "entity.parrot.imitate.ravager", + "entity.parrot.imitate.shulker", + "entity.parrot.imitate.silverfish", + "entity.parrot.imitate.skeleton", + "entity.parrot.imitate.slime", + "entity.parrot.imitate.spider", + "entity.parrot.imitate.stray", + "entity.parrot.imitate.vex", + "entity.parrot.imitate.vindicator", + "entity.parrot.imitate.warden", + "entity.parrot.imitate.witch", + "entity.parrot.imitate.wither", + "entity.parrot.imitate.wither_skeleton", + "entity.parrot.imitate.zoglin", + "entity.parrot.imitate.zombie", + "entity.parrot.imitate.zombie_villager", + "entity.parrot.step", + "entity.phantom.ambient", + "entity.phantom.bite", + "entity.phantom.death", + "entity.phantom.flap", + "entity.phantom.hurt", + "entity.phantom.swoop", + "entity.pig.ambient", + "entity.pig.death", + "entity.pig.hurt", + "entity.pig.saddle", + "entity.pig.step", + "entity.piglin.admiring_item", + "entity.piglin.ambient", + "entity.piglin.angry", + "entity.piglin.celebrate", + "entity.piglin.death", + "entity.piglin.jealous", + "entity.piglin.hurt", + "entity.piglin.retreat", + "entity.piglin.step", + "entity.piglin.converted_to_zombified", + "entity.piglin_brute.ambient", + "entity.piglin_brute.angry", + "entity.piglin_brute.death", + "entity.piglin_brute.hurt", + "entity.piglin_brute.step", + "entity.piglin_brute.converted_to_zombified", + "entity.pillager.ambient", + "entity.pillager.celebrate", + "entity.pillager.death", + "entity.pillager.hurt", + "block.piston.contract", + "block.piston.extend", + "entity.player.attack.crit", + "entity.player.attack.knockback", + "entity.player.attack.nodamage", + "entity.player.attack.strong", + "entity.player.attack.sweep", + "entity.player.attack.weak", + "entity.player.big_fall", + "entity.player.breath", + "entity.player.burp", + "entity.player.death", + "entity.player.hurt", + "entity.player.hurt_drown", + "entity.player.hurt_freeze", + "entity.player.hurt_on_fire", + "entity.player.hurt_sweet_berry_bush", + "entity.player.levelup", + "entity.player.small_fall", + "entity.player.splash", + "entity.player.splash.high_speed", + "entity.player.swim", + "entity.player.teleport", + "entity.polar_bear.ambient", + "entity.polar_bear.ambient_baby", + "entity.polar_bear.death", + "entity.polar_bear.hurt", + "entity.polar_bear.step", + "entity.polar_bear.warning", + "block.polished_deepslate.break", + "block.polished_deepslate.fall", + "block.polished_deepslate.hit", + "block.polished_deepslate.place", + "block.polished_deepslate.step", + "block.portal.ambient", + "block.portal.travel", + "block.portal.trigger", + "block.powder_snow.break", + "block.powder_snow.fall", + "block.powder_snow.hit", + "block.powder_snow.place", + "block.powder_snow.step", + "entity.puffer_fish.ambient", + "entity.puffer_fish.blow_out", + "entity.puffer_fish.blow_up", + "entity.puffer_fish.death", + "entity.puffer_fish.flop", + "entity.puffer_fish.hurt", + "entity.puffer_fish.sting", + "block.pumpkin.carve", + "entity.rabbit.ambient", + "entity.rabbit.attack", + "entity.rabbit.death", + "entity.rabbit.hurt", + "entity.rabbit.jump", + "event.raid.horn", + "entity.ravager.ambient", + "entity.ravager.attack", + "entity.ravager.celebrate", + "entity.ravager.death", + "entity.ravager.hurt", + "entity.ravager.step", + "entity.ravager.stunned", + "entity.ravager.roar", + "block.nether_gold_ore.break", + "block.nether_gold_ore.fall", + "block.nether_gold_ore.hit", + "block.nether_gold_ore.place", + "block.nether_gold_ore.step", + "block.nether_ore.break", + "block.nether_ore.fall", + "block.nether_ore.hit", + "block.nether_ore.place", + "block.nether_ore.step", + "block.redstone_torch.burnout", + "block.respawn_anchor.ambient", + "block.respawn_anchor.charge", + "block.respawn_anchor.deplete", + "block.respawn_anchor.set_spawn", + "block.rooted_dirt.break", + "block.rooted_dirt.fall", + "block.rooted_dirt.hit", + "block.rooted_dirt.place", + "block.rooted_dirt.step", + "entity.salmon.ambient", + "entity.salmon.death", + "entity.salmon.flop", + "entity.salmon.hurt", + "block.sand.break", + "block.sand.fall", + "block.sand.hit", + "block.sand.place", + "block.sand.step", + "block.scaffolding.break", + "block.scaffolding.fall", + "block.scaffolding.hit", + "block.scaffolding.place", + "block.scaffolding.step", + "block.sculk.spread", + "block.sculk.charge", + "block.sculk.break", + "block.sculk.fall", + "block.sculk.hit", + "block.sculk.place", + "block.sculk.step", + "block.sculk_catalyst.bloom", + "block.sculk_catalyst.break", + "block.sculk_catalyst.fall", + "block.sculk_catalyst.hit", + "block.sculk_catalyst.place", + "block.sculk_catalyst.step", + "block.sculk_sensor.clicking", + "block.sculk_sensor.clicking_stop", + "block.sculk_sensor.break", + "block.sculk_sensor.fall", + "block.sculk_sensor.hit", + "block.sculk_sensor.place", + "block.sculk_sensor.step", + "block.sculk_shrieker.break", + "block.sculk_shrieker.fall", + "block.sculk_shrieker.hit", + "block.sculk_shrieker.place", + "block.sculk_shrieker.shriek", + "block.sculk_shrieker.step", + "block.sculk_vein.break", + "block.sculk_vein.fall", + "block.sculk_vein.hit", + "block.sculk_vein.place", + "block.sculk_vein.step", + "entity.sheep.ambient", + "entity.sheep.death", + "entity.sheep.hurt", + "entity.sheep.shear", + "entity.sheep.step", + "item.shield.block", + "item.shield.break", + "block.shroomlight.break", + "block.shroomlight.step", + "block.shroomlight.place", + "block.shroomlight.hit", + "block.shroomlight.fall", + "item.shovel.flatten", + "entity.shulker.ambient", + "block.shulker_box.close", + "block.shulker_box.open", + "entity.shulker_bullet.hit", + "entity.shulker_bullet.hurt", + "entity.shulker.close", + "entity.shulker.death", + "entity.shulker.hurt", + "entity.shulker.hurt_closed", + "entity.shulker.open", + "entity.shulker.shoot", + "entity.shulker.teleport", + "entity.silverfish.ambient", + "entity.silverfish.death", + "entity.silverfish.hurt", + "entity.silverfish.step", + "entity.skeleton.ambient", + "entity.skeleton.converted_to_stray", + "entity.skeleton.death", + "entity.skeleton_horse.ambient", + "entity.skeleton_horse.death", + "entity.skeleton_horse.hurt", + "entity.skeleton_horse.swim", + "entity.skeleton_horse.ambient_water", + "entity.skeleton_horse.gallop_water", + "entity.skeleton_horse.jump_water", + "entity.skeleton_horse.step_water", + "entity.skeleton.hurt", + "entity.skeleton.shoot", + "entity.skeleton.step", + "entity.slime.attack", + "entity.slime.death", + "entity.slime.hurt", + "entity.slime.jump", + "entity.slime.squish", + "block.slime_block.break", + "block.slime_block.fall", + "block.slime_block.hit", + "block.slime_block.place", + "block.slime_block.step", + "block.small_amethyst_bud.break", + "block.small_amethyst_bud.place", + "block.small_dripleaf.break", + "block.small_dripleaf.fall", + "block.small_dripleaf.hit", + "block.small_dripleaf.place", + "block.small_dripleaf.step", + "block.soul_sand.break", + "block.soul_sand.step", + "block.soul_sand.place", + "block.soul_sand.hit", + "block.soul_sand.fall", + "block.soul_soil.break", + "block.soul_soil.step", + "block.soul_soil.place", + "block.soul_soil.hit", + "block.soul_soil.fall", + "particle.soul_escape", + "block.spore_blossom.break", + "block.spore_blossom.fall", + "block.spore_blossom.hit", + "block.spore_blossom.place", + "block.spore_blossom.step", + "entity.strider.ambient", + "entity.strider.happy", + "entity.strider.retreat", + "entity.strider.death", + "entity.strider.hurt", + "entity.strider.step", + "entity.strider.step_lava", + "entity.strider.eat", + "entity.strider.saddle", + "entity.slime.death_small", + "entity.slime.hurt_small", + "entity.slime.jump_small", + "entity.slime.squish_small", + "block.smithing_table.use", + "block.smoker.smoke", + "entity.sniffer.step", + "entity.sniffer.eat", + "entity.sniffer.idle", + "entity.sniffer.hurt", + "entity.sniffer.death", + "entity.sniffer.drop_seed", + "entity.sniffer.scenting", + "entity.sniffer.sniffing", + "entity.sniffer.searching", + "entity.sniffer.digging", + "entity.sniffer.digging_stop", + "entity.sniffer.happy", + "block.sniffer_egg.plop", + "block.sniffer_egg.crack", + "block.sniffer_egg.hatch", + "entity.snowball.throw", + "block.snow.break", + "block.snow.fall", + "entity.snow_golem.ambient", + "entity.snow_golem.death", + "entity.snow_golem.hurt", + "entity.snow_golem.shoot", + "entity.snow_golem.shear", + "block.snow.hit", + "block.snow.place", + "block.snow.step", + "entity.spider.ambient", + "entity.spider.death", + "entity.spider.hurt", + "entity.spider.step", + "entity.splash_potion.break", + "entity.splash_potion.throw", + "block.sponge.break", + "block.sponge.fall", + "block.sponge.hit", + "block.sponge.place", + "block.sponge.step", + "block.sponge.absorb", + "item.spyglass.use", + "item.spyglass.stop_using", + "entity.squid.ambient", + "entity.squid.death", + "entity.squid.hurt", + "entity.squid.squirt", + "block.stone.break", + "block.stone_button.click_off", + "block.stone_button.click_on", + "block.stone.fall", + "block.stone.hit", + "block.stone.place", + "block.stone_pressure_plate.click_off", + "block.stone_pressure_plate.click_on", + "block.stone.step", + "entity.stray.ambient", + "entity.stray.death", + "entity.stray.hurt", + "entity.stray.step", + "block.sweet_berry_bush.break", + "block.sweet_berry_bush.place", + "block.sweet_berry_bush.pick_berries", + "entity.tadpole.death", + "entity.tadpole.flop", + "entity.tadpole.grow_up", + "entity.tadpole.hurt", + "enchant.thorns.hit", + "entity.tnt.primed", + "item.totem.use", + "item.trident.hit", + "item.trident.hit_ground", + "item.trident.return", + "item.trident.riptide_1", + "item.trident.riptide_2", + "item.trident.riptide_3", + "item.trident.throw", + "item.trident.thunder", + "block.tripwire.attach", + "block.tripwire.click_off", + "block.tripwire.click_on", + "block.tripwire.detach", + "entity.tropical_fish.ambient", + "entity.tropical_fish.death", + "entity.tropical_fish.flop", + "entity.tropical_fish.hurt", + "block.tuff.break", + "block.tuff.step", + "block.tuff.place", + "block.tuff.hit", + "block.tuff.fall", + "block.tuff_bricks.break", + "block.tuff_bricks.fall", + "block.tuff_bricks.hit", + "block.tuff_bricks.place", + "block.tuff_bricks.step", + "block.polished_tuff.break", + "block.polished_tuff.fall", + "block.polished_tuff.hit", + "block.polished_tuff.place", + "block.polished_tuff.step", + "entity.turtle.ambient_land", + "entity.turtle.death", + "entity.turtle.death_baby", + "entity.turtle.egg_break", + "entity.turtle.egg_crack", + "entity.turtle.egg_hatch", + "entity.turtle.hurt", + "entity.turtle.hurt_baby", + "entity.turtle.lay_egg", + "entity.turtle.shamble", + "entity.turtle.shamble_baby", + "entity.turtle.swim", + "ui.button.click", + "ui.loom.select_pattern", + "ui.loom.take_result", + "ui.cartography_table.take_result", + "ui.stonecutter.take_result", + "ui.stonecutter.select_recipe", + "ui.toast.challenge_complete", + "ui.toast.in", + "ui.toast.out", + "entity.vex.ambient", + "entity.vex.charge", + "entity.vex.death", + "entity.vex.hurt", + "entity.villager.ambient", + "entity.villager.celebrate", + "entity.villager.death", + "entity.villager.hurt", + "entity.villager.no", + "entity.villager.trade", + "entity.villager.yes", + "entity.villager.work_armorer", + "entity.villager.work_butcher", + "entity.villager.work_cartographer", + "entity.villager.work_cleric", + "entity.villager.work_farmer", + "entity.villager.work_fisherman", + "entity.villager.work_fletcher", + "entity.villager.work_leatherworker", + "entity.villager.work_librarian", + "entity.villager.work_mason", + "entity.villager.work_shepherd", + "entity.villager.work_toolsmith", + "entity.villager.work_weaponsmith", + "entity.vindicator.ambient", + "entity.vindicator.celebrate", + "entity.vindicator.death", + "entity.vindicator.hurt", + "block.vine.break", + "block.vine.fall", + "block.vine.hit", + "block.vine.place", + "block.vine.step", + "block.lily_pad.place", + "entity.wandering_trader.ambient", + "entity.wandering_trader.death", + "entity.wandering_trader.disappeared", + "entity.wandering_trader.drink_milk", + "entity.wandering_trader.drink_potion", + "entity.wandering_trader.hurt", + "entity.wandering_trader.no", + "entity.wandering_trader.reappeared", + "entity.wandering_trader.trade", + "entity.wandering_trader.yes", + "entity.warden.agitated", + "entity.warden.ambient", + "entity.warden.angry", + "entity.warden.attack_impact", + "entity.warden.death", + "entity.warden.dig", + "entity.warden.emerge", + "entity.warden.heartbeat", + "entity.warden.hurt", + "entity.warden.listening", + "entity.warden.listening_angry", + "entity.warden.nearby_close", + "entity.warden.nearby_closer", + "entity.warden.nearby_closest", + "entity.warden.roar", + "entity.warden.sniff", + "entity.warden.sonic_boom", + "entity.warden.sonic_charge", + "entity.warden.step", + "entity.warden.tendril_clicks", + "block.hanging_sign.waxed_interact_fail", + "block.sign.waxed_interact_fail", + "block.water.ambient", + "weather.rain", + "weather.rain.above", + "block.wet_grass.break", + "block.wet_grass.fall", + "block.wet_grass.hit", + "block.wet_grass.place", + "block.wet_grass.step", + "block.wet_sponge.break", + "block.wet_sponge.fall", + "block.wet_sponge.hit", + "block.wet_sponge.place", + "block.wet_sponge.step", + "entity.generic.wind_burst", + "entity.witch.ambient", + "entity.witch.celebrate", + "entity.witch.death", + "entity.witch.drink", + "entity.witch.hurt", + "entity.witch.throw", + "entity.wither.ambient", + "entity.wither.break_block", + "entity.wither.death", + "entity.wither.hurt", + "entity.wither.shoot", + "entity.wither_skeleton.ambient", + "entity.wither_skeleton.death", + "entity.wither_skeleton.hurt", + "entity.wither_skeleton.step", + "entity.wither.spawn", + "entity.wolf.ambient", + "entity.wolf.death", + "entity.wolf.growl", + "entity.wolf.howl", + "entity.wolf.hurt", + "entity.wolf.pant", + "entity.wolf.shake", + "entity.wolf.step", + "entity.wolf.whine", + "block.wooden_door.close", + "block.wooden_door.open", + "block.wooden_trapdoor.close", + "block.wooden_trapdoor.open", + "block.wooden_button.click_off", + "block.wooden_button.click_on", + "block.wooden_pressure_plate.click_off", + "block.wooden_pressure_plate.click_on", + "block.wood.break", + "block.wood.fall", + "block.wood.hit", + "block.wood.place", + "block.wood.step", + "block.wool.break", + "block.wool.fall", + "block.wool.hit", + "block.wool.place", + "block.wool.step", + "entity.zoglin.ambient", + "entity.zoglin.angry", + "entity.zoglin.attack", + "entity.zoglin.death", + "entity.zoglin.hurt", + "entity.zoglin.step", + "entity.zombie.ambient", + "entity.zombie.attack_wooden_door", + "entity.zombie.attack_iron_door", + "entity.zombie.break_wooden_door", + "entity.zombie.converted_to_drowned", + "entity.zombie.death", + "entity.zombie.destroy_egg", + "entity.zombie_horse.ambient", + "entity.zombie_horse.death", + "entity.zombie_horse.hurt", + "entity.zombie.hurt", + "entity.zombie.infect", + "entity.zombified_piglin.ambient", + "entity.zombified_piglin.angry", + "entity.zombified_piglin.death", + "entity.zombified_piglin.hurt", + "entity.zombie.step", + "entity.zombie_villager.ambient", + "entity.zombie_villager.converted", + "entity.zombie_villager.cure", + "entity.zombie_villager.death", + "entity.zombie_villager.hurt", + "entity.zombie_villager.step" + ] +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 7e197d96..95fe1d59 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -projectVersion=4.10.0-23w51b-SNAPSHOT +projectVersion=4.10.0-24w03a-SNAPSHOT # Smile emoji mcVersions=1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13, 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11.1, 1.11, 1.10.2, 1.10.1, 1.10 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7ce3a5a5..5b8d6b13 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ metadata.format.version = "1.1" [versions] # ViaVersion -viaver = "4.10.0-23w51b-SNAPSHOT" +viaver = "4.10.0-24w03a-SNAPSHOT" # Common provided netty = "4.0.20.Final" diff --git a/template/src/main/java/com/viaversion/viabackwards/template/protocol/Protocol1_98To1_99.java b/template/src/main/java/com/viaversion/viabackwards/template/protocol/Protocol1_98To1_99.java index cefc98fd..34c0c671 100644 --- a/template/src/main/java/com/viaversion/viabackwards/template/protocol/Protocol1_98To1_99.java +++ b/template/src/main/java/com/viaversion/viabackwards/template/protocol/Protocol1_98To1_99.java @@ -29,11 +29,11 @@ import com.viaversion.viaversion.api.protocol.packet.ClientboundPacketType; import com.viaversion.viaversion.api.protocol.packet.ServerboundPacketType; import com.viaversion.viaversion.api.protocol.packet.State; import com.viaversion.viaversion.data.entity.EntityTrackerBase; -import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.ServerboundConfigurationPackets1_20_2; -import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ClientboundConfigurationPackets1_20_3; -import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ClientboundPackets1_20_3; -import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ServerboundPackets1_20_3; import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.Protocol1_20_5To1_20_3; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundConfigurationPackets1_20_5; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundPackets1_20_5; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ServerboundConfigurationPackets1_20_5; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ServerboundPackets1_20_5; import com.viaversion.viaversion.rewriter.ComponentRewriter.ReadType; import com.viaversion.viaversion.rewriter.StatisticsRewriter; import com.viaversion.viaversion.rewriter.TagRewriter; @@ -41,50 +41,50 @@ import com.viaversion.viaversion.rewriter.TagRewriter; // Placeholders to replace (in the entire package): // Protocol1_98To_99, EntityPacketRewriter1_99, BlockItemPacketRewriter1_99 // Protocol1_20_5To1_20_3 (the ViaVersion protocol class the mappings depend on) -// ClientboundPackets1_20_3 -// ServerboundPackets1_20_3 -// ClientboundConfigurationPackets1_20_3 -// ServerboundConfigurationPackets1_20_2 +// ClientboundPackets1_20_5 +// ServerboundPackets1_20_5 +// ClientboundConfigurationPackets1_20_5 +// ServerboundConfigurationPackets1_20_5 // EntityTypes1_20_5 (UNMAPPED type) // 1.99, 1.98 -public final class Protocol1_98To1_99 extends BackwardsProtocol { +public final class Protocol1_98To1_99 extends BackwardsProtocol { // ViaBackwards uses its own mappings and also needs a translatablerewriter for translation mappings public static final BackwardsMappings MAPPINGS = new BackwardsMappings("1.99", "1.98", Protocol1_20_5To1_20_3.class); private final EntityPacketRewriter1_99 entityRewriter = new EntityPacketRewriter1_99(this); private final BlockItemPacketRewriter1_99 itemRewriter = new BlockItemPacketRewriter1_99(this); - private final TranslatableRewriter translatableRewriter = new TranslatableRewriter<>(this, ReadType.NBT); + private final TranslatableRewriter translatableRewriter = new TranslatableRewriter<>(this, ReadType.NBT); public Protocol1_98To1_99() { - super(ClientboundPackets1_20_3.class, ClientboundPackets1_20_3.class, ServerboundPackets1_20_3.class, ServerboundPackets1_20_3.class); + super(ClientboundPackets1_20_5.class, ClientboundPackets1_20_5.class, ServerboundPackets1_20_5.class, ServerboundPackets1_20_5.class); } @Override protected void registerPackets() { super.registerPackets(); - final TagRewriter tagRewriter = new TagRewriter<>(this); - tagRewriter.registerGeneric(ClientboundPackets1_20_3.TAGS); - tagRewriter.registerGeneric(State.CONFIGURATION, ClientboundConfigurationPackets1_20_3.UPDATE_TAGS); + final TagRewriter tagRewriter = new TagRewriter<>(this); + tagRewriter.registerGeneric(ClientboundPackets1_20_5.TAGS); + tagRewriter.registerGeneric(State.CONFIGURATION, ClientboundConfigurationPackets1_20_5.UPDATE_TAGS); - final SoundRewriter soundRewriter = new SoundRewriter<>(this); - soundRewriter.register1_19_3Sound(ClientboundPackets1_20_3.SOUND); - soundRewriter.registerSound(ClientboundPackets1_20_3.ENTITY_SOUND); - soundRewriter.registerStopSound(ClientboundPackets1_20_3.STOP_SOUND); + final SoundRewriter soundRewriter = new SoundRewriter<>(this); + soundRewriter.register1_19_3Sound(ClientboundPackets1_20_5.SOUND); + soundRewriter.register1_19_3Sound(ClientboundPackets1_20_5.ENTITY_SOUND); + soundRewriter.registerStopSound(ClientboundPackets1_20_5.STOP_SOUND); - new StatisticsRewriter<>(this).register(ClientboundPackets1_20_3.STATISTICS); + new StatisticsRewriter<>(this).register(ClientboundPackets1_20_5.STATISTICS); // Registers translatable mappings (missing a whole bunch still) - //translatableRewriter.registerOpenWindow(ClientboundPackets1_20_3.OPEN_WINDOW); // Handled by registerOpenWindow in item rewriters - translatableRewriter.registerComponentPacket(ClientboundPackets1_20_3.ACTIONBAR); - translatableRewriter.registerComponentPacket(ClientboundPackets1_20_3.TITLE_TEXT); - translatableRewriter.registerComponentPacket(ClientboundPackets1_20_3.TITLE_SUBTITLE); - translatableRewriter.registerBossBar(ClientboundPackets1_20_3.BOSSBAR); - translatableRewriter.registerComponentPacket(ClientboundPackets1_20_3.DISCONNECT); - translatableRewriter.registerTabList(ClientboundPackets1_20_3.TAB_LIST); - translatableRewriter.registerCombatKill1_20(ClientboundPackets1_20_3.COMBAT_KILL); - translatableRewriter.registerComponentPacket(ClientboundPackets1_20_3.SYSTEM_CHAT); - translatableRewriter.registerComponentPacket(ClientboundPackets1_20_3.DISGUISED_CHAT); + //translatableRewriter.registerOpenWindow(ClientboundPackets1_20_5.OPEN_WINDOW); // Handled by registerOpenWindow in item rewriters + translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.ACTIONBAR); + translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.TITLE_TEXT); + translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.TITLE_SUBTITLE); + translatableRewriter.registerBossBar(ClientboundPackets1_20_5.BOSSBAR); + translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.DISCONNECT); + translatableRewriter.registerTabList(ClientboundPackets1_20_5.TAB_LIST); + translatableRewriter.registerCombatKill1_20(ClientboundPackets1_20_5.COMBAT_KILL); + translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.SYSTEM_CHAT); + translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.DISGUISED_CHAT); translatableRewriter.registerPing(); // TODO Attributes @@ -111,17 +111,17 @@ public final class Protocol1_98To1_99 extends BackwardsProtocol getTranslatableRewriter() { + public TranslatableRewriter getTranslatableRewriter() { return translatableRewriter; } @Override protected ClientboundPacketType clientboundFinishConfigurationPacket() { - return ClientboundConfigurationPackets1_20_3.FINISH_CONFIGURATION; + return ClientboundConfigurationPackets1_20_5.FINISH_CONFIGURATION; } @Override protected ServerboundPacketType serverboundFinishConfigurationPacket() { - return ServerboundConfigurationPackets1_20_2.FINISH_CONFIGURATION; + return ServerboundConfigurationPackets1_20_5.FINISH_CONFIGURATION; } } \ No newline at end of file diff --git a/template/src/main/java/com/viaversion/viabackwards/template/protocol/rewriter/BlockItemPacketRewriter1_99.java b/template/src/main/java/com/viaversion/viabackwards/template/protocol/rewriter/BlockItemPacketRewriter1_99.java index 7be6b518..011d46bd 100644 --- a/template/src/main/java/com/viaversion/viabackwards/template/protocol/rewriter/BlockItemPacketRewriter1_99.java +++ b/template/src/main/java/com/viaversion/viabackwards/template/protocol/rewriter/BlockItemPacketRewriter1_99.java @@ -21,15 +21,16 @@ import com.viaversion.viabackwards.api.rewriters.ItemRewriter; import com.viaversion.viabackwards.template.protocol.Protocol1_98To1_99; import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_20_2; -import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ClientboundPackets1_20_3; -import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ServerboundPackets1_20_3; +import com.viaversion.viaversion.api.type.types.version.Types1_20_3; import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.rewriter.RecipeRewriter1_20_3; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundPackets1_20_5; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ServerboundPackets1_20_5; import com.viaversion.viaversion.rewriter.BlockRewriter; // To replace if needed: // ChunkType1_20_2 // RecipeRewriter1_20_3 -public final class BlockItemPacketRewriter1_99 extends ItemRewriter { +public final class BlockItemPacketRewriter1_99 extends ItemRewriter { public BlockItemPacketRewriter1_99(final Protocol1_98To1_99 protocol) { super(protocol, Type.ITEM1_20_2, Type.ITEM1_20_2_ARRAY); @@ -37,28 +38,29 @@ public final class BlockItemPacketRewriter1_99 extends ItemRewriter blockRewriter = BlockRewriter.for1_20_2(protocol); - blockRewriter.registerBlockAction(ClientboundPackets1_20_3.BLOCK_ACTION); - blockRewriter.registerBlockChange(ClientboundPackets1_20_3.BLOCK_CHANGE); - blockRewriter.registerVarLongMultiBlockChange1_20(ClientboundPackets1_20_3.MULTI_BLOCK_CHANGE); - blockRewriter.registerEffect(ClientboundPackets1_20_3.EFFECT, 1010, 2001); - blockRewriter.registerChunkData1_19(ClientboundPackets1_20_3.CHUNK_DATA, ChunkType1_20_2::new); - blockRewriter.registerBlockEntityData(ClientboundPackets1_20_3.BLOCK_ENTITY_DATA); + final BlockRewriter blockRewriter = BlockRewriter.for1_20_2(protocol); + blockRewriter.registerBlockAction(ClientboundPackets1_20_5.BLOCK_ACTION); + blockRewriter.registerBlockChange(ClientboundPackets1_20_5.BLOCK_CHANGE); + blockRewriter.registerVarLongMultiBlockChange1_20(ClientboundPackets1_20_5.MULTI_BLOCK_CHANGE); + blockRewriter.registerEffect(ClientboundPackets1_20_5.EFFECT, 1010, 2001); + blockRewriter.registerChunkData1_19(ClientboundPackets1_20_5.CHUNK_DATA, ChunkType1_20_2::new); + blockRewriter.registerBlockEntityData(ClientboundPackets1_20_5.BLOCK_ENTITY_DATA); - // registerOpenWindow(ClientboundPackets1_20_3.OPEN_WINDOW); - registerSetCooldown(ClientboundPackets1_20_3.COOLDOWN); - registerWindowItems1_17_1(ClientboundPackets1_20_3.WINDOW_ITEMS); - registerSetSlot1_17_1(ClientboundPackets1_20_3.SET_SLOT); - registerAdvancements1_20_3(ClientboundPackets1_20_3.ADVANCEMENTS); - registerEntityEquipmentArray(ClientboundPackets1_20_3.ENTITY_EQUIPMENT); - registerClickWindow1_17_1(ServerboundPackets1_20_3.CLICK_WINDOW); - registerTradeList1_19(ClientboundPackets1_20_3.TRADE_LIST); - registerCreativeInvAction(ServerboundPackets1_20_3.CREATIVE_INVENTORY_ACTION); - registerWindowPropertyEnchantmentHandler(ClientboundPackets1_20_3.WINDOW_PROPERTY); - registerSpawnParticle1_19(ClientboundPackets1_20_3.SPAWN_PARTICLE); + // registerOpenWindow(ClientboundPackets1_20_5.OPEN_WINDOW); + registerSetCooldown(ClientboundPackets1_20_5.COOLDOWN); + registerWindowItems1_17_1(ClientboundPackets1_20_5.WINDOW_ITEMS); + registerSetSlot1_17_1(ClientboundPackets1_20_5.SET_SLOT); + registerAdvancements1_20_3(ClientboundPackets1_20_5.ADVANCEMENTS); + registerEntityEquipmentArray(ClientboundPackets1_20_5.ENTITY_EQUIPMENT); + registerClickWindow1_17_1(ServerboundPackets1_20_5.CLICK_WINDOW); + registerTradeList1_20_5(ClientboundPackets1_20_5.TRADE_LIST); + registerCreativeInvAction(ServerboundPackets1_20_5.CREATIVE_INVENTORY_ACTION); + registerWindowPropertyEnchantmentHandler(ClientboundPackets1_20_5.WINDOW_PROPERTY); + registerSpawnParticle1_20_5(ClientboundPackets1_20_5.SPAWN_PARTICLE, Types1_20_3.PARTICLE, Types1_20_3.PARTICLE); + registerExplosion(ClientboundPackets1_20_5.EXPLOSION, Types1_20_3.PARTICLE, Types1_20_3.PARTICLE); //TODO Particles in explosion packet - new RecipeRewriter1_20_3<>(protocol).register(ClientboundPackets1_20_3.DECLARE_RECIPES); + new RecipeRewriter1_20_3<>(protocol).register1_20_5(ClientboundPackets1_20_5.DECLARE_RECIPES); } } \ No newline at end of file diff --git a/template/src/main/java/com/viaversion/viabackwards/template/protocol/rewriter/EntityPacketRewriter1_99.java b/template/src/main/java/com/viaversion/viabackwards/template/protocol/rewriter/EntityPacketRewriter1_99.java index 71112c65..0f63f962 100644 --- a/template/src/main/java/com/viaversion/viabackwards/template/protocol/rewriter/EntityPacketRewriter1_99.java +++ b/template/src/main/java/com/viaversion/viabackwards/template/protocol/rewriter/EntityPacketRewriter1_99.java @@ -25,13 +25,13 @@ import com.viaversion.viaversion.api.protocol.packet.State; import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers; import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.types.version.Types1_20_5; -import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ClientboundConfigurationPackets1_20_3; -import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ClientboundPackets1_20_3; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundConfigurationPackets1_20_5; +import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundPackets1_20_5; // Replace if needed // Types1_OLD // Types1_20_5 -public final class EntityPacketRewriter1_99 extends EntityRewriter { +public final class EntityPacketRewriter1_99 extends EntityRewriter { public EntityPacketRewriter1_99(final Protocol1_98To1_99 protocol) { super(protocol, Types1_20_5.META_TYPES.optionalComponentType, Types1_20_5.META_TYPES.booleanType); @@ -39,11 +39,11 @@ public final class EntityPacketRewriter1_99 extends EntityRewriter