diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_17to1_16_4/Protocol1_17To1_16_4.java b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_17to1_16_4/Protocol1_17To1_16_4.java index ee7e036a..ba89d074 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_17to1_16_4/Protocol1_17To1_16_4.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_17to1_16_4/Protocol1_17To1_16_4.java @@ -202,10 +202,10 @@ public final class Protocol1_17To1_16_4 extends BackwardsProtocol { if (wrapper.read(Types.BOOLEAN)) { @@ -240,6 +240,14 @@ public final class Protocol1_17To1_16_4 extends BackwardsProtocol wrapper.write(Types.VAR_INT, type)); } + private void rewriteTitlePacket(ClientboundPackets1_17 newPacketType, int type) { + // Also handles translations in the title + registerClientbound(newPacketType, ClientboundPackets1_16_2.SET_TITLES, wrapper -> { + wrapper.write(Types.VAR_INT, type); + translatableRewriter.processText(wrapper.user(), wrapper.passthrough(Types.COMPONENT)); + }); + } + @Override public EntityPacketRewriter1_17 getEntityRewriter() { return entityRewriter; diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_17to1_16_4/rewriter/EntityPacketRewriter1_17.java b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_17to1_16_4/rewriter/EntityPacketRewriter1_17.java index 0bf2a64a..92801139 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_17to1_16_4/rewriter/EntityPacketRewriter1_17.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_17to1_16_4/rewriter/EntityPacketRewriter1_17.java @@ -25,7 +25,6 @@ import com.viaversion.viaversion.api.minecraft.entities.EntityType; import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_17; import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType; import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers; -import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Types; import com.viaversion.viaversion.api.type.types.version.Types1_16; import com.viaversion.viaversion.api.type.types.version.Types1_17; @@ -133,10 +132,15 @@ public final class EntityPacketRewriter1_17 extends EntityRewriter { + wrapper.write(Types.VAR_INT, 2); + + wrapper.passthrough(Types.VAR_INT); // Duration + wrapper.passthrough(Types.INT); // Killer id + protocol.getComponentRewriter().processText(wrapper.user(), wrapper.passthrough(Types.COMPONENT)); + }); } @Override diff --git a/gradle.properties b/gradle.properties index 32f316e1..f2d1e20e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -projectVersion=5.0.1 +projectVersion=5.0.2-SNAPSHOT # Smile emoji mcVersions=1.21,1.20.6,1.20.5,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