9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-24 09:29:33 +00:00

过时方块破坏修复

This commit is contained in:
XiaoMoMi
2025-06-08 04:58:11 +08:00
parent 2a0618122a
commit b2c76d9ff0
3 changed files with 10 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ import net.momirealms.craftengine.bukkit.nms.FastNMS;
import net.momirealms.craftengine.bukkit.plugin.reflection.minecraft.CoreReflections;
import net.momirealms.craftengine.bukkit.util.BlockStateUtils;
import net.momirealms.craftengine.bukkit.util.LocationUtils;
import net.momirealms.craftengine.core.block.BlockStateWrapper;
import net.momirealms.craftengine.core.block.EmptyBlock;
import net.momirealms.craftengine.core.block.ImmutableBlockState;
import net.momirealms.craftengine.core.plugin.CraftEngine;
@@ -227,7 +228,10 @@ public class WorldStorageInjector {
holder.ceChunk().setDirty(true);
if (Config.enableLightSystem()) {
// 自定义块到原版块,只需要判断旧块是否和客户端一直
updateLight(holder, previous.vanillaBlockState().handle(), previousState, x, y, z);
BlockStateWrapper wrapper = previous.vanillaBlockState();
if (wrapper != null) {
updateLight(holder, wrapper.handle(), previousState, x, y, z);
}
}
}
} else {

View File

@@ -336,7 +336,7 @@ gui:
performance:
# Maximum chain update depth when fixing client visuals
max-note-block-chain-update-limit: 32
max-note-block-chain-update-limit: 48
# Prevent lag or oversized packet when processing emoji-heavy content
max-emojis-per-parse: 16

View File

@@ -17,4 +17,8 @@ public class BlockRegistryMirror {
public static int size() {
return customBlockStates.length;
}
public static BlockStateWrapper stoneState() {
return stoneState;
}
}