Skip to content

Commit

Permalink
avoid #305 by using an AT for getting the inventory instead of the va…
Browse files Browse the repository at this point in the history
…nilla provided getter
  • Loading branch information
Mari023 committed Sep 23, 2024
1 parent 214f338 commit 5d85a6c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- workaround for #305
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ public static ItemMenuHostLocator findTerminal(Player player, WTDefinition termi
}
}

for (int i = 0; i < player.getInventory().getContainerSize(); i++) {
var stack = player.getInventory().getItem(i);
for (int i = 0; i < player.inventory.getContainerSize(); i++) {
var stack = player.inventory.getItem(i);
if (!hasTerminal(stack, terminal))
continue;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
public net.minecraft.world.entity.item.ItemEntity target
public-f net.minecraft.world.inventory.Slot x
public-f net.minecraft.world.inventory.Slot y
public-f net.minecraft.world.inventory.Slot y
public net.minecraft.world.entity.player.Player inventory
3 changes: 2 additions & 1 deletion src/main/resources/META-INF/accesstransformer.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
public net.minecraft.world.entity.item.ItemEntity target
public-f net.minecraft.world.inventory.Slot x
public-f net.minecraft.world.inventory.Slot y
public-f net.minecraft.world.inventory.Slot y
public net.minecraft.world.entity.player.Player inventory

0 comments on commit 5d85a6c

Please sign in to comment.