Skip to content

Commit

Permalink
Merge branch 'dev/1.21.4' into dev/1.21.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ishland committed Jan 16, 2025
2 parents 5fa572e + f2b9ea5 commit 1c65b22
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 51 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2021-2024 ishland
Copyright (c) 2021-2025 ishland

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.ishland.c2me.notickvd.mixin;

import com.google.common.collect.ImmutableList;
import com.ishland.c2me.base.common.threadstate.ThreadInstrumentation;
import com.ishland.c2me.base.mixin.access.IThreadedAnvilChunkStorage;
import com.ishland.c2me.rewrites.chunksystem.common.ChunkLoadingContext;
Expand Down Expand Up @@ -98,9 +99,16 @@ public CompletionStage<Void> upgradeToThis(ChunkLoadingContext context, Cancella
}
return CompletableFuture.runAsync(() -> {
try (var ignored = ThreadInstrumentation.getCurrent().begin(new ChunkTaskWork(context, (ServerAccessibleChunkSending) (Object) this, true))) {
ServerWorld serverWorld = ((IThreadedAnvilChunkStorage) context.tacs()).getWorld();
for (BlockPos blockPos : blocksToRemove) {
serverWorld.setBlockState(blockPos, Blocks.AIR.getDefaultState(), Block.NO_REDRAW | Block.FORCE_STATE);
if (Config.suppressGhostMushrooms) {
ServerWorld serverWorld = ((IThreadedAnvilChunkStorage) context.tacs()).getWorld();
ChunkState state = context.holder().getItem().get();
Chunk chunk = state.chunk();
for (BlockPos blockPos : blocksToRemove) {
serverWorld.setBlockState(blockPos, Blocks.AIR.getDefaultState(), Block.NO_REDRAW | Block.FORCE_STATE);
}
for (BlockPos blockPos2 : ImmutableList.copyOf(chunk.getBlockEntityPositions())) {
chunk.getBlockEntity(blockPos2);
}
}
sendChunkToPlayer(context.tacs(), context.holder());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ protected ExceptionHandlingAction handleTransactionException(ItemHolder<ChunkPos
protected void onItemCreation(ItemHolder<ChunkPos, ChunkState, ChunkLoadingContext, NewChunkHolderVanillaInterface> holder) {
super.onItemCreation(holder);
holder.getUserData().set(new NewChunkHolderVanillaInterface(this, holder, ((IThreadedAnvilChunkStorage) this.tacs).getWorld(), ((IThreadedAnvilChunkStorage) this.tacs).getLightingProvider(), this.tacs));
holder.getItem().set(new ChunkState(null, null, null));
}

@Override
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"MixinSerializingRegionBasedStorage",
"MixinServerChunkManager",
"MixinThreadedAnvilChunkStorage",
"MixinWorldChunk",
"async_serialization.MixinBlender",
"async_serialization.MixinChunkRegion",
"async_serialization.MixinChunkSerializer",
Expand Down

0 comments on commit 1c65b22

Please sign in to comment.