Skip to content

Commit

Permalink
Revert "Fix MixinServerPlayerGameMode"
Browse files Browse the repository at this point in the history
This reverts commit 5d171c4.
  • Loading branch information
wdog5734 committed Oct 17, 2024
1 parent 6116970 commit 9e061bc
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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<Boolean> cir, @Local LocalRef<BlockState> 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<Boolean> 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
Expand Down

0 comments on commit 9e061bc

Please sign in to comment.