diff options
| author | anhgelus <anhgelus.morhtuuzh@proton.me> | 2025-06-01 20:06:51 +0000 |
|---|---|---|
| committer | anhgelus <anhgelus.morhtuuzh@proton.me> | 2025-06-01 20:06:51 +0000 |
| commit | 32234ce4d1a08090357af81ac824ab42c0462065 (patch) | |
| tree | a97dc1871f495b4690bcaabb05a8e5da570f1ea4 /src/main | |
| parent | 0f17a07012476af5eac58a479c0a36abfaad1070 (diff) | |
feat(): support renamed methods in 1.21.5
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/java/world/anhgelus/manhunt/Manhunt.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/world/anhgelus/manhunt/Manhunt.java b/src/main/java/world/anhgelus/manhunt/Manhunt.java index 2ba2ad5..ee373e1 100644 --- a/src/main/java/world/anhgelus/manhunt/Manhunt.java +++ b/src/main/java/world/anhgelus/manhunt/Manhunt.java @@ -240,8 +240,8 @@ public class Manhunt implements ModInitializer { ItemStack is = null;
int slot = PlayerInventory.NOT_FOUND;
final var inv = player.getInventory();
- if (inv.getMainHandStack().isOf(Items.COMPASS)) {
- is = inv.getMainHandStack();
+ if (inv.getSelectedStack().isOf(Items.COMPASS)) {
+ is = inv.getSelectedStack();
slot = inv.getSlotWithStack(is);
} else if (inv.getStack(PlayerInventory.OFF_HAND_SLOT).isOf(Items.COMPASS)) {
is = inv.getStack(PlayerInventory.OFF_HAND_SLOT);
|
