diff --git a/c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/common/fapi/LifecycleEventInvoker.java b/c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/common/fapi/LifecycleEventInvoker.java index 9c5d96998..e6fc18a3f 100644 --- a/c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/common/fapi/LifecycleEventInvoker.java +++ b/c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/common/fapi/LifecycleEventInvoker.java @@ -6,9 +6,12 @@ public class LifecycleEventInvoker { - public static void invokeChunkLoaded(ServerWorld world, WorldChunk chunk) { + public static void invokeChunkLoaded(ServerWorld world, WorldChunk chunk, boolean newChunk) { try { ServerChunkEvents.CHUNK_LOAD.invoker().onChunkLoad(world, chunk); + if (newChunk) { + ServerChunkEvents.CHUNK_GENERATE.invoker().onChunkGenerate(world, chunk); + } } catch (Throwable t) { t.printStackTrace(); } diff --git a/c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/common/statuses/ServerAccessible.java b/c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/common/statuses/ServerAccessible.java index 29803d740..e7da3401a 100644 --- a/c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/common/statuses/ServerAccessible.java +++ b/c2me-rewrites-chunk-system/src/main/java/com/ishland/c2me/rewrites/chunksystem/common/statuses/ServerAccessible.java @@ -67,7 +67,7 @@ public CompletionStage upgradeToThis(ChunkLoadingContext context) { worldChunk.updateAllBlockEntities(); worldChunk.addChunkTickSchedulers(serverWorld); if (ModStatuses.fabric_lifecycle_events_v1) { - LifecycleEventInvoker.invokeChunkLoaded(serverWorld, worldChunk); + LifecycleEventInvoker.invokeChunkLoaded(serverWorld, worldChunk, !(protoChunk instanceof WrapperProtoChunk)); } } diff --git a/gradle.properties b/gradle.properties index 8106ae0c6..eec6ae398 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ fabric.loom.multiProjectOptimisation=true minecraft_version=1.21.1 yarn_mappings=1.21.1+build.1 loader_version=0.16.3 -fabric_version=0.102.0+1.21.1 +fabric_version=0.107.0+1.21.1 # Mod Properties mod_version=0.3.0+alpha.0 maven_group=com.ishland.c2me diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 51b01a6f0..bb6a358a0 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -36,6 +36,7 @@ }, "breaks": { "tic_tacs": "*", - "optifabric": "*" + "optifabric": "*", + "fabric-api": "<0.107.0" } }