Added config option for using compressed sieves simultaneously

This commit is contained in:
thedarkcolour 2024-04-21 13:00:34 -07:00
parent c63011a27a
commit b3540cdb80
No known key found for this signature in database
GPG Key ID: 86B37B3575FD5976
2 changed files with 12 additions and 2 deletions

View File

@ -3,12 +3,18 @@ package thedarkcolour.exdeorum.blockentity;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.state.BlockState;
import thedarkcolour.exdeorum.blockentity.logic.CompressedSieveLogic;
import thedarkcolour.exdeorum.config.EConfig;
import thedarkcolour.exdeorum.registry.EBlockEntities;
public class CompressedSieveBlockEntity extends AbstractSieveBlockEntity {
private static final float COMPRESSED_SIEVE_INTERVAl = 0.075f;
private static final float COMPRESSED_SIEVE_INTERVAL = 0.075f;
public CompressedSieveBlockEntity(BlockPos pos, BlockState state) {
super(EBlockEntities.COMPRESSED_SIEVE.get(), pos, state, COMPRESSED_SIEVE_INTERVAl, owner -> new CompressedSieveLogic(owner, false));
super(EBlockEntities.COMPRESSED_SIEVE.get(), pos, state, COMPRESSED_SIEVE_INTERVAL, owner -> new CompressedSieveLogic(owner, false));
}
@Override
protected boolean canUseSimultaneously() {
return EConfig.SERVER.simultaneousCompressedSieveUsage.getAsBoolean();
}
}

View File

@ -125,6 +125,7 @@ public class EConfig {
public final IntValue simultaneousSieveUsageRange;
public final BooleanValue automatedSieves;
public final BooleanValue nerfAutomatedSieves;
public final BooleanValue simultaneousCompressedSieveUsage;
public final DoubleValue barrelProgressStep;
public final BooleanValue witchWaterDirtGenerator;
public final BooleanValue witchWaterNetherrackGenerator;
@ -160,6 +161,9 @@ public class EConfig {
this.nerfAutomatedSieves = builder
.comment("Whether machines/fake players that interact with the Sieve can sieve in a 3x3 or larger. This option does nothing if automated_sieves is set to false.")
.define("nerf_automated_sieves", true);
this.simultaneousCompressedSieveUsage = builder
.comment("Whether players can use multiple compressed sieves in a 3x3 or larger area at once.")
.define("simultaneous_compressed_sieve_usage", false);
this.barrelProgressStep = builder
.comment("The progress to increment by each tick for barrel composting.")
.defineInRange("barrel_progress_step", 0.004, 0.0f, 1.0f);