From 4d1e689719baeedd90a9dac347a5656d791257ae Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Sun, 14 Jan 2024 12:23:06 +0000 Subject: [PATCH] Fix endPage() not updating the printer block state This meant that we didn't show the bottom slot was full until other items were moved in the inventory. --- .../shared/peripheral/printer/PrinterBlockEntity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/common/src/main/java/dan200/computercraft/shared/peripheral/printer/PrinterBlockEntity.java b/projects/common/src/main/java/dan200/computercraft/shared/peripheral/printer/PrinterBlockEntity.java index deb10f0ea..f6037802a 100644 --- a/projects/common/src/main/java/dan200/computercraft/shared/peripheral/printer/PrinterBlockEntity.java +++ b/projects/common/src/main/java/dan200/computercraft/shared/peripheral/printer/PrinterBlockEntity.java @@ -225,7 +225,9 @@ private boolean outputPage() { var stack = PrintoutItem.createSingleFromTitleAndText(pageTitle, lines, colours); for (var slot : BOTTOM_SLOTS) { if (inventory.get(slot).isEmpty()) { - setItem(slot, stack); + inventory.set(slot, stack); + updateBlockState(); + setChanged(); printing = false; return true; }