25 lines
1.7 KiB
Diff
25 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Cryptite <cryptite@gmail.com>
|
|
Date: Sat, 16 Nov 2024 08:48:20 -0600
|
|
Subject: [PATCH] Add ChunkStatusChangeEvent
|
|
|
|
|
|
diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
|
index eafa4e6d55cd0f9314ac0f2b96a7f48fbb5e1a4c..ee5f51bc5f31f269bdac239cb48265ae355db1ff 100644
|
|
--- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
|
+++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
|
@@ -1261,6 +1261,13 @@ public final class NewChunkHolder {
|
|
// note: currentChunk must be LevelChunk, as current != pending which means that at least one is not ACCESSIBLE
|
|
final LevelChunk chunk = (LevelChunk)this.currentChunk;
|
|
|
|
+ // Slice start
|
|
+ new com.destroystokyo.paper.event.chunk.ChunkStatusChangeEvent(new org.bukkit.craftbukkit.CraftChunk(chunk),
|
|
+ com.destroystokyo.paper.event.chunk.ChunkStatusChangeEvent.ChunkStatus.valueOf(current.name()),
|
|
+ com.destroystokyo.paper.event.chunk.ChunkStatusChangeEvent.ChunkStatus.valueOf(current.name()))
|
|
+ .callEvent();
|
|
+ // Slice end
|
|
+
|
|
// Note: we assume that only load/unload contain plugin logic
|
|
// plugin logic is anything stupid enough to possibly change the chunk status while it is already
|
|
// being changed (i.e during load it is possible it will try to set to full ticking)
|