From 967d584a7cff795783fe6ad0bc7d127caa211be8 Mon Sep 17 00:00:00 2001 From: Wide_Cat Date: Tue, 31 Dec 2024 15:20:28 +0000 Subject: [PATCH] Fix boat fly for chest boats and rafts --- .../meteorclient/events/entity/BoatMoveEvent.java | 6 +++--- .../meteorclient/mixin/AbstractBoatEntityMixin.java | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/meteordevelopment/meteorclient/events/entity/BoatMoveEvent.java b/src/main/java/meteordevelopment/meteorclient/events/entity/BoatMoveEvent.java index 50beeb8ac4..6abc337460 100644 --- a/src/main/java/meteordevelopment/meteorclient/events/entity/BoatMoveEvent.java +++ b/src/main/java/meteordevelopment/meteorclient/events/entity/BoatMoveEvent.java @@ -5,14 +5,14 @@ package meteordevelopment.meteorclient.events.entity; -import net.minecraft.entity.vehicle.BoatEntity; +import net.minecraft.entity.vehicle.AbstractBoatEntity; public class BoatMoveEvent { private static final BoatMoveEvent INSTANCE = new BoatMoveEvent(); - public BoatEntity boat; + public AbstractBoatEntity boat; - public static BoatMoveEvent get(BoatEntity entity) { + public static BoatMoveEvent get(AbstractBoatEntity entity) { INSTANCE.boat = entity; return INSTANCE; } diff --git a/src/main/java/meteordevelopment/meteorclient/mixin/AbstractBoatEntityMixin.java b/src/main/java/meteordevelopment/meteorclient/mixin/AbstractBoatEntityMixin.java index dd175938d8..adcc03bde8 100644 --- a/src/main/java/meteordevelopment/meteorclient/mixin/AbstractBoatEntityMixin.java +++ b/src/main/java/meteordevelopment/meteorclient/mixin/AbstractBoatEntityMixin.java @@ -10,7 +10,6 @@ import meteordevelopment.meteorclient.systems.modules.Modules; import meteordevelopment.meteorclient.systems.modules.movement.BoatFly; import net.minecraft.entity.vehicle.AbstractBoatEntity; -import net.minecraft.entity.vehicle.BoatEntity; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; @@ -28,7 +27,7 @@ public abstract class AbstractBoatEntityMixin { @Inject(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/vehicle/AbstractBoatEntity;move(Lnet/minecraft/entity/MovementType;Lnet/minecraft/util/math/Vec3d;)V")) private void onTickInvokeMove(CallbackInfo info) { - if ((Object) this instanceof BoatEntity boatEntity) { + if ((Object) this instanceof AbstractBoatEntity boatEntity) { MeteorClient.EVENT_BUS.post(BoatMoveEvent.get(boatEntity)); } }