From bda040c6c2cc77c9c1a06a61b2f13548d28d76ec Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Tue, 1 Apr 2025 01:37:55 +0200 Subject: WIP: Port some 1.21.5 things --- src/main/java/moe/nea/firmament/mixins/PlayerDropEventPatch.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/moe/nea/firmament/mixins/PlayerDropEventPatch.java') diff --git a/src/main/java/moe/nea/firmament/mixins/PlayerDropEventPatch.java b/src/main/java/moe/nea/firmament/mixins/PlayerDropEventPatch.java index b20c223..f07604e 100644 --- a/src/main/java/moe/nea/firmament/mixins/PlayerDropEventPatch.java +++ b/src/main/java/moe/nea/firmament/mixins/PlayerDropEventPatch.java @@ -20,7 +20,7 @@ public abstract class PlayerDropEventPatch extends PlayerEntity { @Inject(method = "dropSelectedItem", at = @At("HEAD"), cancellable = true) public void onDropSelectedItem(boolean entireStack, CallbackInfoReturnable cir) { - Slot fakeSlot = new Slot(getInventory(), getInventory().selectedSlot, 0, 0); + Slot fakeSlot = new Slot(getInventory(), getInventory().getSelectedSlot(), 0, 0); if (IsSlotProtectedEvent.shouldBlockInteraction(fakeSlot, SlotActionType.THROW, IsSlotProtectedEvent.MoveOrigin.DROP_FROM_HOTBAR)) { cir.setReturnValue(false); } -- cgit