possibly really fixed #112??

This commit is contained in:
Ell 2022-01-24 23:06:17 +01:00
parent 58e0eaa336
commit 87ecc7f74e
2 changed files with 3 additions and 2 deletions

View file

@ -175,7 +175,7 @@ public class ItemTerminalTileEntity extends TileEntity implements INamedContaine
return stack.getCount() - ret.getRight().getCount(); return stack.getCount() - ret.getRight().getCount();
} }
protected PlayerEntity[] getLookingPlayers() { public PlayerEntity[] getLookingPlayers() {
return this.world.getPlayers().stream() return this.world.getPlayers().stream()
.filter(p -> p.openContainer instanceof ItemTerminalContainer) .filter(p -> p.openContainer instanceof ItemTerminalContainer)
.filter(p -> ((ItemTerminalContainer) p.openContainer).tile == this) .filter(p -> ((ItemTerminalContainer) p.openContainer).tile == this)

View file

@ -39,7 +39,8 @@ public class CraftingTerminalContainer extends ItemTerminalContainer {
this.craftResult = new CraftResultInventory() { this.craftResult = new CraftResultInventory() {
@Override @Override
public void markDirty() { 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)); this.addSlot(new CraftingResultSlot(player, this.craftInventory, this.craftResult, 0, 25, 77));