Skip to content

Commit

Permalink
Moonrise compatibility: Set require=0 for ChunkStatusTracker Inject
Browse files Browse the repository at this point in the history
  • Loading branch information
2No2Name committed Jan 18, 2025
1 parent ed78ec1 commit 5cc76af
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ public ChunkHolderMixin(ChunkPos chunkPos) {

@Inject(
method = "updateFutures(Lnet/minecraft/server/level/ChunkMap;Ljava/util/concurrent/Executor;)V", locals = LocalCapture.CAPTURE_FAILHARD,
at = @At(value = "INVOKE", target = "Lnet/minecraft/server/level/FullChunkStatus;isOrAfter(Lnet/minecraft/server/level/FullChunkStatus;)Z", ordinal = 6)
at = @At(value = "INVOKE", target = "Lnet/minecraft/server/level/FullChunkStatus;isOrAfter(Lnet/minecraft/server/level/FullChunkStatus;)Z", ordinal = 6),
// See ca.spottledleaf.moonrise.compat.lithium.LithiumHooks and https://github.com/Tuinity/Moonrise/blob/c2cf9858998d9245cb2f548a4618b8772d054125/src/main/java/ca/spottedleaf/moonrise/mixin/chunk_system/ChunkHolderMixin.java#L401
// Moonrise will call Lithium's ChunkStatusTracker methods directly, in turn we set require = 0, avoiding a conflict with their overwrite.
require = 0
)
private void trackUpdate(ChunkMap chunkMap, Executor executor, CallbackInfo ci, FullChunkStatus prevStatus, FullChunkStatus status) {
ServerLevel serverLevel = chunkMap.level;
Expand Down

0 comments on commit 5cc76af

Please sign in to comment.