diff --git a/banner-server/src/main/java/com/mohistmc/banner/mixin/server/level/MixinServerPlayerGameMode.java b/banner-server/src/main/java/com/mohistmc/banner/mixin/server/level/MixinServerPlayerGameMode.java index f80ae18ca..cb789518e 100644 --- a/banner-server/src/main/java/com/mohistmc/banner/mixin/server/level/MixinServerPlayerGameMode.java +++ b/banner-server/src/main/java/com/mohistmc/banner/mixin/server/level/MixinServerPlayerGameMode.java @@ -1,7 +1,5 @@ package com.mohistmc.banner.mixin.server.level; -import com.llamalad7.mixinextras.sugar.Local; -import com.llamalad7.mixinextras.sugar.ref.LocalRef; import com.mohistmc.banner.injection.server.level.InjectionServerPlayerGameMode; import java.util.ArrayList; import java.util.Objects; @@ -360,8 +358,9 @@ public void handleBlockBreakAction(BlockPos blockposition, ServerboundPlayerActi at = @At(value = "INVOKE", target = "Lnet/minecraft/server/level/ServerLevel;getBlockEntity(Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/level/block/entity/BlockEntity;", shift = At.Shift.BEFORE), locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true) - private void banner$resetState(BlockPos pos, CallbackInfoReturnable cir, @Local LocalRef blockState) { blockState.set(this.level.getBlockState(pos)); // CraftBukkit - update state from plugins - if (blockState.get().isAir()) cir.setReturnValue(false); // CraftBukkit - A plugin set block to air without cancelling + private void banner$resetState(BlockPos pos, CallbackInfoReturnable cir, BlockState blockState) { + blockState = this.level.getBlockState(pos); // CraftBukkit - update state from plugins + if (blockState.isAir()) cir.setReturnValue(false); // CraftBukkit - A plugin set block to air without cancelling } // CraftBukkit start - whole method