From d1c8da39a2a717a2b6f2f9435d6c11ceb75b0a49 Mon Sep 17 00:00:00 2001 From: QZero <51401792+QZero233@users.noreply.github.com> Date: Sun, 4 Jan 2026 08:14:55 +0000 Subject: [PATCH 1/5] Initial commit From 88d37a052567bac2ee5baf099bb0c989a5d2d6b2 Mon Sep 17 00:00:00 2001 From: QZero <51401792+QZero233@users.noreply.github.com> Date: Sun, 4 Jan 2026 08:14:56 +0000 Subject: [PATCH 2/5] Initial commit From 891cb95a47b55bfca42da045088df58fbc31eab2 Mon Sep 17 00:00:00 2001 From: QZero <51401792+QZero233@users.noreply.github.com> Date: Sun, 4 Jan 2026 08:14:56 +0000 Subject: [PATCH 3/5] Initial commit From 0e38b31a9be4b8663edd4f1c49883ec067709aa5 Mon Sep 17 00:00:00 2001 From: QZero <51401792+QZero233@users.noreply.github.com> Date: Sun, 4 Jan 2026 08:14:59 +0000 Subject: [PATCH 4/5] Initial commit From 92a426b4c67f76880fe4b333bc0ddcf83d7fe617 Mon Sep 17 00:00:00 2001 From: QZero <51401792+QZero233@users.noreply.github.com> Date: Sun, 4 Jan 2026 08:17:30 +0000 Subject: [PATCH 5/5] fix: Fix the crash problem of postbox See https://github.com/Creators-of-Create/Create/issues/9785 --- .../create/foundation/item/ItemHelper.java | 35 +++++++++++++------ 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java b/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java index 6ce09ecefc..04fd0c0455 100644 --- a/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java +++ b/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java @@ -103,19 +103,34 @@ public static int calcRedstoneFromInventory(@Nullable Storage inv) float f = 0.0F; int totalSlots = 0; - try (Transaction t = TransferUtil.getTransaction()) { - for (StorageView view : inv) { - long slotLimit = view.getCapacity(); - if (slotLimit == 0) { - continue; + // Try to open a transaction for stable reads. If we're inside a Transaction.close() callback, + // Fabric forbids starting/inspecting the current transaction and will throw IllegalStateException. + // In that case, fall back to reading without creating a new transaction. + try { + try (Transaction t = TransferUtil.getTransaction()) { + for (StorageView view : inv) { + long slotLimit = view.getCapacity(); + if (slotLimit == 0) { + continue; + } + totalSlots++; + if (!view.isResourceBlank()) { + f += (float) view.getAmount() / (float) Math.min(slotLimit, view.getResource().getItem().getMaxStackSize()); + ++i; + } + } } - totalSlots++; - if (!view.isResourceBlank()) { - f += (float) view.getAmount() / (float) Math.min(slotLimit, view.getResource().getItem().getMaxStackSize()); - ++i; + } catch (IllegalStateException e) { + for (StorageView view : inv) { + long slotLimit = view.getCapacity(); + if (slotLimit == 0) continue; + totalSlots++; + if (!view.isResourceBlank()) { + f += (float) view.getAmount() / (float) Math.min(slotLimit, view.getResource().getItem().getMaxStackSize()); + ++i; + } } } - } if (totalSlots == 0) return 0;