From a129f6353f85360b1fa6d877223b9bf783fc0bcf Mon Sep 17 00:00:00 2001 From: Drex Date: Sun, 3 Nov 2024 20:19:28 +0100 Subject: [PATCH] Fix ClassCastException crash --- .../ledger/mixin/blocks/LilyPadBlockMixin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/github/quiltservertools/ledger/mixin/blocks/LilyPadBlockMixin.java b/src/main/java/com/github/quiltservertools/ledger/mixin/blocks/LilyPadBlockMixin.java index b1f101fb..dce70b01 100644 --- a/src/main/java/com/github/quiltservertools/ledger/mixin/blocks/LilyPadBlockMixin.java +++ b/src/main/java/com/github/quiltservertools/ledger/mixin/blocks/LilyPadBlockMixin.java @@ -6,7 +6,7 @@ import net.minecraft.block.LilyPadBlock; import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.vehicle.BoatEntity; +import net.minecraft.entity.vehicle.AbstractBoatEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; @@ -18,7 +18,7 @@ public abstract class LilyPadBlockMixin { @Inject(method = "onEntityCollision", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;breakBlock(Lnet/minecraft/util/math/BlockPos;ZLnet/minecraft/entity/Entity;)Z")) private void ledgerLogLilyPadBreak(BlockState state, World world, BlockPos pos, Entity entity, CallbackInfo ci) { - BoatEntity boat = (BoatEntity) entity; + AbstractBoatEntity boat = (AbstractBoatEntity) entity; if (boat.getFirstPassenger() instanceof PlayerEntity player) { BlockBreakCallback.EVENT.invoker().breakBlock(world, new BlockPos(pos), state, null, Sources.VEHICLE, player); } else {