Add config options to prevent barrels and crucibles from collecting rainwater
This commit is contained in:
parent
f59fa93def
commit
9ea5529ce6
|
|
@ -366,7 +366,7 @@ public abstract class AbstractCrucibleBlockEntity extends EBlockEntity {
|
|||
crucible.markUpdated();
|
||||
}
|
||||
}
|
||||
if (tank.getFluidAmount() < MAX_FLUID_CAPACITY && crucible instanceof WaterCrucibleBlockEntity && level.isRainingAt(pos.above())) {
|
||||
if (EConfig.SERVER.cruciblesCollectRainWater.get() && tank.getFluidAmount() < MAX_FLUID_CAPACITY && crucible instanceof WaterCrucibleBlockEntity && level.isRainingAt(pos.above())) {
|
||||
BarrelBlockEntity.fillRainWater(crucible, tank);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -540,7 +540,7 @@ public class BarrelBlockEntity extends EBlockEntity {
|
|||
}
|
||||
barrel.markUpdated();
|
||||
}
|
||||
} else if (tank.getFluidAmount() < MAX_CAPACITY && level.isRainingAt(pos.above()) && barrel.item.getStackInSlot(0).isEmpty() && barrel.compost == 0) {
|
||||
} else if (EConfig.SERVER.barrelsCollectRainWater.get() && tank.getFluidAmount() < MAX_CAPACITY && level.isRainingAt(pos.above()) && barrel.item.getStackInSlot(0).isEmpty() && barrel.compost == 0) {
|
||||
fillRainWater(barrel, tank);
|
||||
|
||||
// avoid checking fluid transform until full
|
||||
|
|
|
|||
|
|
@ -139,6 +139,8 @@ public class EConfig {
|
|||
public final IntValue mechanicalHammerEnergyStorage;
|
||||
public final IntValue mechanicalHammerEnergyConsumption;
|
||||
public final IntValue sieveIntervalTicks;
|
||||
public final BooleanValue barrelsCollectRainWater;
|
||||
public final BooleanValue cruciblesCollectRainWater;
|
||||
|
||||
public Server(ForgeConfigSpec.Builder builder) {
|
||||
builder.comment("Server configuration for Ex Deorum").push("server");
|
||||
|
|
@ -203,6 +205,12 @@ public class EConfig {
|
|||
this.sieveIntervalTicks = builder
|
||||
.comment("The minimum number of ticks a player must wait between two sifting operations. Only affects sifting by hand. 0 means no limit.")
|
||||
.defineInRange("sieve_interval", 1, 0, Integer.MAX_VALUE);
|
||||
this.barrelsCollectRainWater = builder
|
||||
.comment("Whether barrels fill up with rain water while it is raining and the barrel is exposed to the sky.")
|
||||
.define("barrels_collect_rain_water", true);
|
||||
this.cruciblesCollectRainWater = builder
|
||||
.comment("Whether wooden crucibles fill up with rain water while it is raining and the barrel is exposed to the sky.")
|
||||
.define("crucibles_collect_rain_water", true);
|
||||
builder.pop();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user