From efe0dafeddd0820a4b0fc0e39dd718a4921ada9a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 21 May 2026 13:01:17 +0000 Subject: [PATCH 1/2] Automated build rust natives --- .../sable_rapier_binaries.zip.l4z | Bin 8918314 -> 8918311 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/common/src/main/resources/natives/sable_rapier/sable_rapier_binaries.zip.l4z b/common/src/main/resources/natives/sable_rapier/sable_rapier_binaries.zip.l4z index 3d11cc1738f5118c14cc7164e0c6e85dfb010acb..0ac035ddd523f581e6c99c1fe20cf6365c1becc4 100644 GIT binary patch delta 483 zcmXBPyH8UA9L4c+dwD38QmueiP_SwhsDKybrGOTcmmpUZDk|UuX+?QMt4PJKy(F$C z9VC$jMP|aqKY_*B!NlOiz<`SzjX%Ti8P7R6D=UlY7ZD)=1uH6vB#}%C``Aw^HV%-6 zopc-=| z@Ux{Sw)rs}wf;@88-azecqv|q8Sz@oiimh4=EPfpcxMI{qDEVuBm*`}y5h^SOegKw vzBw#gOAbqi?$d`$*T2vC2FGKv?J~UEQPaC^eD>_U{o$O?-P_-F&KLdz58cJh delta 469 zcmXBP%`?;i9LI6lWmhFDt4;KPmCZvcKaaIhj?9?8#^H7ReBbk3Sz9)*i3n$i#e|tS;;~>QfwP?BJc(Q& z2^+~=Bn3OET*AR+(zrr88C>NW*SSF^S!ClRhnwW$;ud-2Q$QiNDdG-yxkoVyC6rP| zITciLp9i>kNEOvQ;xRSU@`O6-X`qoNnrY!Ft+dh3Gdl3_oKCuU!ArXF(!(oy>EktT z=;tl(c#n?{_!(f3q4j`MF^9t$6}n3a%$R<;6SY+(AU+za%CNc}8{^QN$HQVojEYa< zvj~bYF)k*=q?j_C$J5=NCuj7CC*-hNTg!6Q+C^2j9YoWO4Nu5zvG^u}LEp%@cH|8i zM_zTW+WccB?~lIwQ;nJyrSD%-#TOA4Gvce56%jEf=EXOG_-^=@qFUR@QvbUjbyyGE elYjqnZ>?*RG;9ajrt9>-9s5G&Y3b0uQ1~B0#lrsp From dbb2cf707b981e622c185a911c79f1c0b3564148 Mon Sep 17 00:00:00 2001 From: boberchik342 Date: Thu, 21 May 2026 09:16:15 -0400 Subject: [PATCH 2/2] fixed chunk load event not firing on the server for plot chunks --- .../sable/platform/SableChunkEventPlatform.java | 2 ++ .../ryanhcode/sable/sublevel/plot/LevelPlot.java | 8 ++++++-- .../sable/sublevel/plot/ServerLevelPlot.java | 13 ++++++++++++- .../platform/SableChunkEventPlatformImpl.java | 9 +++++++-- .../platform/SableChunkEventPlatformImpl.java | 5 +++++ 5 files changed, 32 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/dev/ryanhcode/sable/platform/SableChunkEventPlatform.java b/common/src/main/java/dev/ryanhcode/sable/platform/SableChunkEventPlatform.java index 26ac1ae7..f39fee89 100644 --- a/common/src/main/java/dev/ryanhcode/sable/platform/SableChunkEventPlatform.java +++ b/common/src/main/java/dev/ryanhcode/sable/platform/SableChunkEventPlatform.java @@ -10,4 +10,6 @@ public interface SableChunkEventPlatform { void onChunkPacketReplaced(final LevelChunk chunk); void onOldChunkInvalid(final LevelChunk chunk); + + void onServerChunkLoad(final LevelChunk chunk); } diff --git a/common/src/main/java/dev/ryanhcode/sable/sublevel/plot/LevelPlot.java b/common/src/main/java/dev/ryanhcode/sable/sublevel/plot/LevelPlot.java index 4bcb4121..512619e1 100644 --- a/common/src/main/java/dev/ryanhcode/sable/sublevel/plot/LevelPlot.java +++ b/common/src/main/java/dev/ryanhcode/sable/sublevel/plot/LevelPlot.java @@ -5,6 +5,7 @@ import dev.ryanhcode.sable.api.sublevel.SubLevelContainer; import dev.ryanhcode.sable.companion.math.BoundingBox3i; import dev.ryanhcode.sable.companion.math.BoundingBox3ic; +import dev.ryanhcode.sable.platform.SableChunkEventPlatform; import dev.ryanhcode.sable.sublevel.ServerSubLevel; import dev.ryanhcode.sable.sublevel.SubLevel; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; @@ -140,7 +141,7 @@ public BlockPos getCenterBlock() { * * @param pos the global chunk position */ - protected void newChunk(final ChunkPos pos, final LevelChunk chunk, final boolean initializeLighting) { + protected void newChunk(final ChunkPos pos, final LevelChunk chunk, final boolean initializeLighting, final boolean fireEvent) { final ChunkPos local = this.toLocal(pos); if (this.getChunkHolder(local) != null) { @@ -149,6 +150,9 @@ protected void newChunk(final ChunkPos pos, final LevelChunk chunk, final boolea final PlotChunkHolder holder = PlotChunkHolder.create(chunk.getLevel(), pos, this.getLightEngine(), chunk); this.addChunkHolder(local, holder, initializeLighting); + if (fireEvent) { + SableChunkEventPlatform.INSTANCE.onServerChunkLoad(chunk); + } } /** @@ -176,7 +180,7 @@ public void newEmptyChunk(final ChunkPos pos) { } final LevelChunk chunk = new LevelChunk(level, pos, UpgradeData.EMPTY, new LevelChunkTicks<>(), new LevelChunkTicks<>(), 0L, sections, null, null); - this.newChunk(pos, chunk, true); + this.newChunk(pos, chunk, true, true); } diff --git a/common/src/main/java/dev/ryanhcode/sable/sublevel/plot/ServerLevelPlot.java b/common/src/main/java/dev/ryanhcode/sable/sublevel/plot/ServerLevelPlot.java index 1bc7964e..20911fe3 100644 --- a/common/src/main/java/dev/ryanhcode/sable/sublevel/plot/ServerLevelPlot.java +++ b/common/src/main/java/dev/ryanhcode/sable/sublevel/plot/ServerLevelPlot.java @@ -10,6 +10,7 @@ import dev.ryanhcode.sable.companion.math.BoundingBox3i; import dev.ryanhcode.sable.index.SableTags; import dev.ryanhcode.sable.mixinterface.plot.serialization.LevelChunkTicksExtension; +import dev.ryanhcode.sable.platform.SableChunkEventPlatform; import dev.ryanhcode.sable.platform.SablePlotPlatform; import dev.ryanhcode.sable.sublevel.ServerSubLevel; import dev.ryanhcode.sable.sublevel.SubLevel; @@ -324,7 +325,7 @@ private void newNonLitChunk(final ChunkPos pos) { } final LevelChunk chunk = new LevelChunk(level, pos, UpgradeData.EMPTY, new LevelChunkTicks<>(), new LevelChunkTicks<>(), 0L, sections, null, null); - this.newChunk(pos, chunk, false); + this.newChunk(pos, chunk, false, false); } /** @@ -648,6 +649,16 @@ public void load(final CompoundTag tag) { subLevel.updateMergedMassData(1.0f); physicsSystem.getPipeline().onStatsChanged(subLevel); + for (final String key : chunks.getAllKeys()) { + final long chunkPos = Long.parseLong(key); + + final int x = ChunkPos.getX(chunkPos); + final int z = ChunkPos.getZ(chunkPos); + final ChunkPos local = new ChunkPos(x, z); + final LevelChunk chunk = this.getChunk(local); + + SableChunkEventPlatform.INSTANCE.onServerChunkLoad(chunk); + } } /** diff --git a/fabric/src/main/java/dev/ryanhcode/sable/fabric/platform/SableChunkEventPlatformImpl.java b/fabric/src/main/java/dev/ryanhcode/sable/fabric/platform/SableChunkEventPlatformImpl.java index 1747e55f..ab47e32c 100644 --- a/fabric/src/main/java/dev/ryanhcode/sable/fabric/platform/SableChunkEventPlatformImpl.java +++ b/fabric/src/main/java/dev/ryanhcode/sable/fabric/platform/SableChunkEventPlatformImpl.java @@ -2,8 +2,8 @@ import dev.ryanhcode.sable.platform.SableChunkEventPlatform; import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientChunkEvents; -import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.world.level.chunk.LevelChunk; +import net.fabricmc.fabric.api.event.lifecycle.v1.ServerChunkEvents;import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.server.level.ServerLevel;import net.minecraft.world.level.chunk.LevelChunk; import org.jetbrains.annotations.ApiStatus; @ApiStatus.Internal @@ -18,4 +18,9 @@ public void onChunkPacketReplaced(final LevelChunk chunk) { public void onOldChunkInvalid(final LevelChunk chunk) { ClientChunkEvents.CHUNK_UNLOAD.invoker().onChunkUnload((ClientLevel) chunk.getLevel(), chunk); } + + @Override + public void onServerChunkLoad(final LevelChunk chunk) { + ServerChunkEvents.CHUNK_LOAD.invoker().onChunkLoad((ServerLevel) chunk.getLevel(), chunk); + } } diff --git a/neoforge/src/main/java/dev/ryanhcode/sable/neoforge/platform/SableChunkEventPlatformImpl.java b/neoforge/src/main/java/dev/ryanhcode/sable/neoforge/platform/SableChunkEventPlatformImpl.java index bb55f58e..3bc719c3 100644 --- a/neoforge/src/main/java/dev/ryanhcode/sable/neoforge/platform/SableChunkEventPlatformImpl.java +++ b/neoforge/src/main/java/dev/ryanhcode/sable/neoforge/platform/SableChunkEventPlatformImpl.java @@ -18,4 +18,9 @@ public void onChunkPacketReplaced(final LevelChunk chunk) { public void onOldChunkInvalid(final LevelChunk chunk) { // no-op } + + @Override + public void onServerChunkLoad(final LevelChunk chunk) { + NeoForge.EVENT_BUS.post(new ChunkEvent.Load(chunk, false)); + } }