diff options
author | Noah van der Aa <[email protected]> | 2024-04-29 23:14:35 +0200 |
---|---|---|
committer | Noah van der Aa <[email protected]> | 2024-04-29 23:14:35 +0200 |
commit | 5b962f83c66fb8400a4ad1a46ac021ab998595df (patch) | |
tree | 163e7cfd71dbda6b410e7b88aaa32571b4304041 /patches/server/0832-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch | |
parent | 5a954bea77bbe687843615a4017c71d3156b305f (diff) | |
download | Paper-5b962f83c66fb8400a4ad1a46ac021ab998595df.tar.gz Paper-5b962f83c66fb8400a4ad1a46ac021ab998595df.zip |
Re-add dropped patches, mojang missed some stuff
Diffstat (limited to 'patches/server/0832-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch')
-rw-r--r-- | patches/server/0832-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/patches/server/0832-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch b/patches/server/0832-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch deleted file mode 100644 index 98ae07fa8b..0000000000 --- a/patches/server/0832-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shane Freeder <[email protected]> -Date: Wed, 5 Apr 2023 20:15:47 +0100 -Subject: [PATCH] Prevent GameEvents being fired from unloaded chunks - - -diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 3ce6604a74d7ab0b045901261d58736ca4c543a7..751efd2400a1c6fa6e1db72080c4f17fa9a9c548 100644 ---- a/src/main/java/net/minecraft/server/level/ServerLevel.java -+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1374,6 +1374,11 @@ public class ServerLevel extends Level implements WorldGenLevel { - - @Override - public void gameEvent(Holder<GameEvent> event, Vec3 emitterPos, GameEvent.Context emitter) { -+ // Paper start - Prevent GameEvents being fired from unloaded chunks -+ if (this.getChunkIfLoadedImmediately((Mth.floor(emitterPos.x) >> 4), (Mth.floor(emitterPos.z) >> 4)) == null) { -+ return; -+ } -+ // Paper end - Prevent GameEvents being fired from unloaded chunks - this.gameEventDispatcher.post(event, emitterPos, emitter); - } - |