Skip to content

Commit

Permalink
Fix boat fly for chest boats and rafts
Browse files Browse the repository at this point in the history
  • Loading branch information
Wide-Cat committed Dec 31, 2024
1 parent de82095 commit 967d584
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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));
}
}
Expand Down

0 comments on commit 967d584

Please sign in to comment.