Skip to content

Commit db66b24

Browse files
committed
change: allow disabling mushroom mitigation
1 parent 1839d3c commit db66b24

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/common/Config.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ public class Config {
2020
""")
2121
.getBoolean(false, false);
2222

23+
public static final boolean suppressGhostMushrooms = new ConfigSystem.ConfigAccessor()
24+
.key("chunkSystem.suppressGhostMushrooms")
25+
.comment("""
26+
This option workarounds MC-276863, a bug that makes mushrooms appear in non-postprocessed chunks
27+
This bug is amplified with notickvd as it exposes non-postprocessed chunks to players
28+
29+
This should not affect other worldgen behavior and game mechanics in general
30+
""")
31+
.getBoolean(true, false);
32+
2333
public static void init() {
2434
// intentionally empty
2535
}

c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/common/statuses/ServerAccessible.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public CompletionStage<Void> upgradeToThis(ChunkLoadingContext context) {
6363
final Chunk chunk = context.holder().getItem().get().chunk();
6464
Preconditions.checkState(chunk instanceof ProtoChunk, "Chunk must be a proto chunk");
6565
ProtoChunk protoChunk = (ProtoChunk) chunk;
66-
{
66+
67+
if (Config.suppressGhostMushrooms) {
6768
ServerWorld serverWorld = ((IThreadedAnvilChunkStorage) context.tacs()).getWorld();
6869
ChunkRegion chunkRegion = new ChunkRegion(serverWorld, context.chunks(), ChunkGenerationSteps.GENERATION.get(ChunkStatus.FULL), chunk);
6970

0 commit comments

Comments
 (0)