9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-28 19:39:11 +00:00

Update BukkitWorldManager.java

This commit is contained in:
XiaoMoMi
2025-03-24 05:06:07 +08:00
parent d3668b855b
commit b796862baa

View File

@@ -217,7 +217,7 @@ public class BukkitWorldManager implements WorldManager, Listener {
for (int z = 0; z < 16; z++) {
for (int y = 0; y < 16; y++) {
ImmutableBlockState customState = ceSection.getBlockState(x, y, z);
if (customState != null && customState.vanillaBlockState() != null) {
if (!customState.isEmpty() && customState.vanillaBlockState() != null) {
Reflections.method$LevelChunkSection$setBlockState.invoke(section, x, y, z, customState.vanillaBlockState().handle(), false);
}
}
@@ -259,7 +259,7 @@ public class BukkitWorldManager implements WorldManager, Listener {
for (int z = 0; z < 16; z++) {
for (int y = 0; y < 16; y++) {
ImmutableBlockState customState = ceSection.getBlockState(x, y, z);
if (customState != null && customState.customBlockState() != null) {
if (!customState.isEmpty() && customState.customBlockState() != null) {
Reflections.method$LevelChunkSection$setBlockState.invoke(section, x, y, z, customState.customBlockState().handle(), false);
}
}