only apply to extract oil

This commit is contained in:
okx-code
2026-07-01 01:13:31 +01:00
parent bede5202c4
commit 72548ce294
3 changed files with 10 additions and 1 deletions

View File

@@ -489,7 +489,7 @@ public class FurnCraftChestFactory extends Factory implements IIOFInventoryProvi
public void run() {
if (active && mbs.isComplete()) {
Block f = getFurnace();
if (!f.getWorld().isChunkLoaded(f.getLocation().getBlockX() >> 4, f.getLocation().getBlockZ() >> 4)) {
if (currentRecipe.mustBeLoaded() && !f.getWorld().isChunkLoaded(f.getLocation().getBlockX() >> 4, f.getLocation().getBlockZ() >> 4)) {
sendActivatorMessage(ChatColor.GOLD + name + " deactivated, because the chunk was unloaded");
deactivate();
return;

View File

@@ -82,4 +82,9 @@ public class ExtractOilRecipe extends ProductionRecipe {
public boolean canApplySpeed() {
return false;
}
@Override
public boolean mustBeLoaded() {
return true;
}
}

View File

@@ -72,4 +72,8 @@ public interface IRecipe {
default boolean canApplySpeed() {
return true;
}
default boolean mustBeLoaded() {
return false;
}
}