Skip to content

Commit

Permalink
Update Fabric API and call ServerChunkEvents.CHUNK_GENERATE
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Oct 26, 2024
1 parent 7bedc1a commit 3cb888e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.chunk.ChunkAccess;
import net.minecraft.world.level.chunk.ImposterProtoChunk;
import net.minecraft.world.level.chunk.LevelChunk;
import net.minecraft.world.level.chunk.ProtoChunk;
import net.minecraft.world.level.chunk.status.ChunkStatusTasks;
Expand Down Expand Up @@ -69,6 +70,9 @@ public void setCurrentlyLoading(final GenerationChunkHolder holder, final LevelC
public void chunkFullStatusComplete(final LevelChunk newChunk, final ProtoChunk original) {
if (HAS_FABRIC_LIFECYCLE_EVENTS) {
ServerChunkEvents.CHUNK_LOAD.invoker().onChunkLoad((ServerLevel)newChunk.getLevel(), newChunk);
if (!(original instanceof ImposterProtoChunk)) {
ServerChunkEvents.CHUNK_GENERATE.invoker().onChunkGenerate((ServerLevel)newChunk.getLevel(), newChunk);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ minecraft_version=1.21.3
loader_version=0.16.7
supported_minecraft_versions=1.21.3
neoforge_version=21.3.0-beta
fabric_api_version=0.106.1+1.21.3
fabric_api_version=0.107.0+1.21.3
snakeyaml_version=2.2
concurrentutil_version=0.0.2-SNAPSHOT
cloth_version=16.0.141
Expand Down

0 comments on commit 3cb888e

Please sign in to comment.