Skip to content

Commit

Permalink
fix: don't duplicate suppressGhostMushrooms
Browse files Browse the repository at this point in the history
  • Loading branch information
ishland committed Jan 24, 2025
1 parent b349bf1 commit 9a6e5ca
Showing 1 changed file with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,43 @@ index 4bb24b66..21ada3b6 100644
}

@Unique
diff --git a/c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/common/statuses/ServerAccessible.java b/c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/common/statuses/ServerAccessible.java
index efc8596a..b973b73a 100644
--- a/c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/common/statuses/ServerAccessible.java
+++ b/c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/common/statuses/ServerAccessible.java
@@ -45,32 +45,6 @@ public class ServerAccessible extends NewChunkStatus {
Preconditions.checkState(chunk instanceof ProtoChunk, "Chunk must be a proto chunk");
ProtoChunk protoChunk = (ProtoChunk) chunk;

- if (Config.suppressGhostMushrooms) {
- try (var ignored = ThreadInstrumentation.getCurrent().begin(new ChunkTaskWork(context, this, true))) {
- ServerWorld serverWorld = ((IThreadedAnvilChunkStorage) context.tacs()).getWorld();
- ChunkRegion chunkRegion = new ChunkRegion(serverWorld, context.chunks(), ChunkGenerationSteps.GENERATION.get(ChunkStatus.FULL), chunk);
-
- ChunkPos chunkPos = context.holder().getKey();
-
- ShortList[] postProcessingLists = protoChunk.getPostProcessingLists();
- for (int i = 0; i < postProcessingLists.length; i++) {
- if (postProcessingLists[i] != null) {
- for (ShortListIterator iterator = postProcessingLists[i].iterator(); iterator.hasNext(); ) {
- short short_ = iterator.nextShort();
- BlockPos blockPos = ProtoChunk.joinBlockPos(short_, protoChunk.sectionIndexToCoord(i), chunkPos);
- BlockState blockState = protoChunk.getBlockState(blockPos);
-
- if (blockState.getBlock() == Blocks.BROWN_MUSHROOM || blockState.getBlock() == Blocks.RED_MUSHROOM) {
- if (!blockState.canPlaceAt(chunkRegion, blockPos)) {
- protoChunk.setBlockState(blockPos, Blocks.AIR.getDefaultState(), false); // TODO depends on the fact that the chunk system always locks the current chunk
- }
- }
- }
- }
- }
- }
- }
-
return CompletableFuture.runAsync(() -> {
try (var ignored = ThreadInstrumentation.getCurrent().begin(new ChunkTaskWork(context, this, true))) {
ServerWorld serverWorld = ((IThreadedAnvilChunkStorage) context.tacs()).getWorld();
diff --git a/c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/mixin/MixinWorldChunk.java b/c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/mixin/MixinWorldChunk.java
deleted file mode 100644
index 7746bcbc..00000000
Expand Down

0 comments on commit 9a6e5ca

Please sign in to comment.