Configure cauldron operations brewing consumption and feedback

This commit is contained in:
2026-09-12 14:19:03 +03:00
parent cae34a70d5
commit 1ac7dedcb0
10 changed files with 136 additions and 28 deletions
@@ -27,6 +27,7 @@ import org.slf4j.*;
public final class AstraCauldron {
static final Logger LOG = LoggerFactory.getLogger("AstraCauldron");
private static SoupPots pots;
private static final SoupConfig DEFAULT_CONFIG = new SoupConfig();
private static LiquidPots liquids;
public AstraCauldron() {
NeoForge.EVENT_BUS.addListener(EventPriority.HIGHEST, this::resources);
@@ -56,6 +57,7 @@ public final class AstraCauldron {
private void stop(ServerStoppingEvent event) { if (pots != null) pots.close(); if (liquids != null) liquids.close(); pots = null; liquids = null; }
private void tick(ServerTickEvent.Post event) { if (pots != null) pots.tick(); if (liquids != null) liquids.tick(); }
public static SoupPots pots() { return pots; }
public static SoupConfig config() { return pots == null ? DEFAULT_CONFIG : pots.config(); }
public static LiquidPots liquids() { return liquids; }
public static boolean occupied(Level level, BlockPos pos) {
return level instanceof ServerLevel serverLevel && ((pots != null && pots.contains(serverLevel, pos))