From b3540cdb8084cb88fcaabb51715fb959981eb811 Mon Sep 17 00:00:00 2001 From: thedarkcolour <30441001+thedarkcolour@users.noreply.github.com> Date: Sun, 21 Apr 2024 13:00:34 -0700 Subject: [PATCH] Added config option for using compressed sieves simultaneously --- .../blockentity/CompressedSieveBlockEntity.java | 10 ++++++++-- .../java/thedarkcolour/exdeorum/config/EConfig.java | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/thedarkcolour/exdeorum/blockentity/CompressedSieveBlockEntity.java b/src/main/java/thedarkcolour/exdeorum/blockentity/CompressedSieveBlockEntity.java index b859681e..b3d14d01 100644 --- a/src/main/java/thedarkcolour/exdeorum/blockentity/CompressedSieveBlockEntity.java +++ b/src/main/java/thedarkcolour/exdeorum/blockentity/CompressedSieveBlockEntity.java @@ -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(); } } diff --git a/src/main/java/thedarkcolour/exdeorum/config/EConfig.java b/src/main/java/thedarkcolour/exdeorum/config/EConfig.java index a58a0fd8..cba01100 100644 --- a/src/main/java/thedarkcolour/exdeorum/config/EConfig.java +++ b/src/main/java/thedarkcolour/exdeorum/config/EConfig.java @@ -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);