From 1708d04d02981806d554ba7589132df38023eb79 Mon Sep 17 00:00:00 2001 From: Term4 Date: Mon, 31 Aug 2026 22:45:15 -0500 Subject: [PATCH] Send the delayed potion spawn's velocity as its own packet in 1.9->1.8 --- .../v1_9to1_8/rewriter/EntityPacketRewriter1_9.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/src/main/java/com/viaversion/viarewind/protocol/v1_9to1_8/rewriter/EntityPacketRewriter1_9.java b/common/src/main/java/com/viaversion/viarewind/protocol/v1_9to1_8/rewriter/EntityPacketRewriter1_9.java index 39da66209..e34969496 100644 --- a/common/src/main/java/com/viaversion/viarewind/protocol/v1_9to1_8/rewriter/EntityPacketRewriter1_9.java +++ b/common/src/main/java/com/viaversion/viarewind/protocol/v1_9to1_8/rewriter/EntityPacketRewriter1_9.java @@ -604,6 +604,15 @@ private void sendDelayedPotionSpawn(final EntityDataHandlerEvent event, final En addEntity.write(Types.SHORT, spawn.velocityY()); addEntity.write(Types.SHORT, spawn.velocityZ()); addEntity.send(Protocol1_9To1_8.class); // Before the entity data is sent + + // 1.8 clients never apply a potion spawn's velocity - vanilla servers send it in a separate + // velocity packet after the spawn, so do the same + final PacketWrapper setEntityMotion = PacketWrapper.create(ClientboundPackets1_8.SET_ENTITY_MOTION, event.user()); + setEntityMotion.write(Types.VAR_INT, event.entityId()); + setEntityMotion.write(Types.SHORT, spawn.velocityX()); + setEntityMotion.write(Types.SHORT, spawn.velocityY()); + setEntityMotion.write(Types.SHORT, spawn.velocityZ()); + setEntityMotion.send(Protocol1_9To1_8.class); } private void handleEntityData(EntityDataHandlerEvent event, EntityData entityData) {