Skip to content

Commit

Permalink
Fix not being able to take items from foreman
Browse files Browse the repository at this point in the history
  • Loading branch information
SamB440 committed Mar 24, 2023
1 parent fcfdb15 commit 3ee2131
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected void build(FlowLayout rootComponent) {
final IntegratedServer server = MinecraftClient.getInstance().getServer();
final ServerPlayerEntity serverPlayer = server.getPlayerManager().getPlayer(player.getUuid());
final ForemanEntity serverForeman = (ForemanEntity) serverPlayer.getWorld().getEntityById(entity.getId());
final int slotWithStack = InventoryUtils.getSlotWithStack(entity.getInventory(), new ItemStack(item, 64));
final int slotWithStack = InventoryUtils.getSlotWithStack(serverForeman.getInventory(), new ItemStack(item, 64));
if (slotWithStack == -1) {
Translations.FOREMAN_COLLECT_RESOURCES_EMPTY.send(player);
return;
Expand Down

0 comments on commit 3ee2131

Please sign in to comment.