diff --git a/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/worldedit/FastAsyncWorldEditDelegate.java b/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/worldedit/FastAsyncWorldEditDelegate.java index 476e6370c..04669495f 100644 --- a/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/worldedit/FastAsyncWorldEditDelegate.java +++ b/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/worldedit/FastAsyncWorldEditDelegate.java @@ -45,8 +45,6 @@ import org.jetbrains.annotations.Nullable; import java.io.IOException; import java.lang.reflect.Method; import java.util.*; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ConcurrentHashMap; import static java.util.Objects.requireNonNull; @@ -222,11 +220,12 @@ public class FastAsyncWorldEditDelegate extends AbstractDelegateExtent { try { CEChunk ceChunk = Optional.ofNullable(this.ceWorld.getChunkAtIfLoaded(chunkX, chunkZ)) .orElse(this.ceWorld.worldDataStorage().readChunkAt(this.ceWorld, new ChunkPos(chunkX, chunkZ))); + CESection ceSection = ceChunk.sectionById(SectionPos.blockToSectionCoord(blockY)); ImmutableBlockState immutableBlockState = BukkitBlockManager.instance().getImmutableBlockState(newStateId); if (immutableBlockState == null) { - ceChunk.setBlockState(blockX, blockY, blockZ, EmptyBlock.STATE); + ceSection.setBlockState(blockX & 15, blockY & 15, blockZ & 15, EmptyBlock.STATE); } else { - ceChunk.setBlockState(blockX, blockY, blockZ, immutableBlockState); + ceSection.setBlockState(blockX & 15, blockY & 15, blockZ & 15, immutableBlockState); } this.chunksToSave.add(ceChunk); } catch (IOException e) { diff --git a/common-files/src/main/resources/config.yml b/common-files/src/main/resources/config.yml index 5acc916c1..9222673b8 100644 --- a/common-files/src/main/resources/config.yml +++ b/common-files/src/main/resources/config.yml @@ -84,8 +84,6 @@ resource-pack: ip: "localhost" port: 8163 protocol: "http" - # The optional URL must be complete and include a trailing slash / at the end. - #url: "http://localhost:8163/" deny-non-minecraft-request: true one-time-token: true rate-limit: @@ -380,9 +378,9 @@ chunk-system: # Settings for injection injection: # Requires a restart to apply - # SECTION: Inject the LevelChunkSection (Faster & Experimental) since 0.0.53 + # SECTION: Inject the LevelChunkSection # PALETTE: Inject the PalettedContainer - target: PALETTE + target: SECTION # Enables faster injection method # Note: May not work with certain server forks that alter chunk class structure (In most cases it won't conflict) use-fast-method: false diff --git a/core/src/main/java/net/momirealms/craftengine/core/item/AbstractItemManager.java b/core/src/main/java/net/momirealms/craftengine/core/item/AbstractItemManager.java index 0bb7a59cf..6865d2cf7 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/item/AbstractItemManager.java +++ b/core/src/main/java/net/momirealms/craftengine/core/item/AbstractItemManager.java @@ -16,6 +16,7 @@ import net.momirealms.craftengine.core.pack.AbstractPackManager; import net.momirealms.craftengine.core.pack.LoadingSequence; import net.momirealms.craftengine.core.pack.Pack; import net.momirealms.craftengine.core.pack.ResourceLocation; +import net.momirealms.craftengine.core.pack.host.ResourcePackHosts; import net.momirealms.craftengine.core.pack.model.*; import net.momirealms.craftengine.core.pack.model.generation.AbstractModelGenerator; import net.momirealms.craftengine.core.pack.model.generation.ModelGeneration; diff --git a/core/src/main/java/net/momirealms/craftengine/core/world/chunk/CEChunk.java b/core/src/main/java/net/momirealms/craftengine/core/world/chunk/CEChunk.java index 45b0a52b8..fb00cc0dc 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/world/chunk/CEChunk.java +++ b/core/src/main/java/net/momirealms/craftengine/core/world/chunk/CEChunk.java @@ -113,7 +113,7 @@ public class CEChunk { return this.sections[index]; } - @Nullable + @NotNull public CESection sectionById(int sectionId) { return this.sections[sectionIndex(sectionId)]; }