From a88e2f3fb522f22151916bbd020be714b8be7571 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 4 Sep 2024 18:29:05 +0200 Subject: [PATCH] Set impulse to 0.98 instead of 1 as per vanilla value --- .../rewriter/EntityPacketRewriter1_21_2.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/rewriter/EntityPacketRewriter1_21_2.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/rewriter/EntityPacketRewriter1_21_2.java index 6146c61fd..568effd71 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/rewriter/EntityPacketRewriter1_21_2.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/rewriter/EntityPacketRewriter1_21_2.java @@ -41,6 +41,8 @@ import java.util.Arrays; public final class EntityPacketRewriter1_21_2 extends EntityRewriter { + private static final float IMPULSE = 0.98F; + public EntityPacketRewriter1_21_2(final Protocol1_21To1_21_2 protocol) { super(protocol); } @@ -154,11 +156,11 @@ public final class EntityPacketRewriter1_21_2 extends EntityRewriter innerEffects = effect.getListTag("effects", CompoundTag.class); + if (innerEffects != null) { + for (final CompoundTag innerEffect : innerEffects) { + updateAttributeField(innerEffect, mappings); + } } } }