fixed pipes not being marked as changed when they do

closes #153
This commit is contained in:
Ell 2022-10-22 10:19:56 +02:00
parent 6d5a805160
commit 26393be8b6
2 changed files with 6 additions and 0 deletions

View file

@ -129,6 +129,7 @@ public class ItemFilter extends ItemStackHandler {
public void save() { public void save() {
if (this.modified) { if (this.modified) {
this.stack.getOrCreateTag().put("filter", this.serializeNBT()); this.stack.getOrCreateTag().put("filter", this.serializeNBT());
this.pipe.setChanged();
this.modified = false; this.modified = false;
} }
} }

View file

@ -65,6 +65,11 @@ public class PipeBlockEntity extends BlockEntity implements MenuProvider, IPipeC
public int getSlotLimit(int slot) { public int getSlotLimit(int slot) {
return 1; return 1;
} }
@Override
protected void onContentsChanged(int slot) {
PipeBlockEntity.this.setChanged();
}
}; };
public final Queue<NetworkLock> craftIngredientRequests = new LinkedList<>(); public final Queue<NetworkLock> craftIngredientRequests = new LinkedList<>();
public final List<Pair<BlockPos, ItemStack>> craftResultRequests = new ArrayList<>(); public final List<Pair<BlockPos, ItemStack>> craftResultRequests = new ArrayList<>();