Skip to content

Commit

Permalink
possibly really fixed #112??
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellpeck committed Jan 24, 2022
1 parent 58e0eaa commit 87ecc7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public int requestItemImpl(ItemStack stack, Consumer<ItemStack> unavailableConsu
return stack.getCount() - ret.getRight().getCount();
}

protected PlayerEntity[] getLookingPlayers() {
public PlayerEntity[] getLookingPlayers() {
return this.world.getPlayers().stream()
.filter(p -> p.openContainer instanceof ItemTerminalContainer)
.filter(p -> ((ItemTerminalContainer) p.openContainer).tile == this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ protected void addOwnSlots(PlayerEntity player) {
this.craftResult = new CraftResultInventory() {
@Override
public void markDirty() {
CraftingTerminalContainer.this.onCraftMatrixChanged(this);
for (PlayerEntity player : CraftingTerminalContainer.this.getTile().getLookingPlayers())
player.openContainer.onCraftMatrixChanged(this);
}
};
this.addSlot(new CraftingResultSlot(player, this.craftInventory, this.craftResult, 0, 25, 77));
Expand Down

0 comments on commit 87ecc7f

Please sign in to comment.