diff options
Diffstat (limited to 'src/main/java/moe/nea/firmament/mixins/MixinClientPlayerEntity.java')
-rw-r--r-- | src/main/java/moe/nea/firmament/mixins/MixinClientPlayerEntity.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/MixinClientPlayerEntity.java b/src/main/java/moe/nea/firmament/mixins/MixinClientPlayerEntity.java index 21e3308..16e8fc3 100644 --- a/src/main/java/moe/nea/firmament/mixins/MixinClientPlayerEntity.java +++ b/src/main/java/moe/nea/firmament/mixins/MixinClientPlayerEntity.java @@ -10,6 +10,7 @@ import moe.nea.firmament.events.IsSlotProtectedEvent; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.screen.slot.Slot; +import net.minecraft.screen.slot.SlotActionType; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -24,7 +25,7 @@ public abstract class MixinClientPlayerEntity extends PlayerEntity { @Inject(method = "dropSelectedItem", at = @At("HEAD"), cancellable = true) public void onDropSelectedItem(boolean entireStack, CallbackInfoReturnable<Boolean> cir) { Slot fakeSlot = new Slot(getInventory(), getInventory().selectedSlot, 0, 0); - if (IsSlotProtectedEvent.shouldBlockInteraction(fakeSlot)) { + if (IsSlotProtectedEvent.shouldBlockInteraction(fakeSlot, SlotActionType.THROW)) { cir.setReturnValue(false); } } |