deactivate unloaded factories

This commit is contained in:
okx-code
2026-07-01 00:40:43 +01:00
parent 1ef0594283
commit bede5202c4

View File

@@ -488,6 +488,12 @@ public class FurnCraftChestFactory extends Factory implements IIOFInventoryProvi
@Override
public void run() {
if (active && mbs.isComplete()) {
Block f = getFurnace();
if (!f.getWorld().isChunkLoaded(f.getLocation().getBlockX() >> 4, f.getLocation().getBlockZ() >> 4)) {
sendActivatorMessage(ChatColor.GOLD + name + " deactivated, because the chunk was unloaded");
deactivate();
return;
}
// if the materials required to produce the current recipe are in
// the factory inventory
if (hasInputMaterials()) {