From 780b82fa302ce75a6cbe3b3ba8bb6bc16367eb29 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Fri, 16 Jun 2023 12:52:26 +0800 Subject: [PATCH] Readd Petal's Reduce sensor work patch --- ...atch => 0019-Petal-Reduce-sensor-work.patch} | 0 ...-Akarin-Save-Json-list-asynchronously.patch} | 0 ....patch => 0021-Slice-Smooth-Teleports.patch} | 0 ...atch => 0022-PaperPR-Optimize-VarInts.patch} | 0 ...archment-Make-FixLight-use-action-bar.patch} | 0 ...ils.patch => 0024-Leaves-Server-Utils.patch} | 0 ...ol.patch => 0025-Leaves-Jade-Protocol.patch} | 0 ...tch => 0026-Leaves-Appleskin-Protocol.patch} | 0 ...tch => 0027-Leaves-Xaero-Map-Protocol.patch} | 0 ...-log4j-compatible-with-future-release.patch} | 0 ...error.patch => 0029-Fix-compile-error.patch} | 0 ...-reduce-work-done-by-game-event-system.patch | 17 ++--------------- 12 files changed, 2 insertions(+), 15 deletions(-) rename patches/server/{0020-Petal-Reduce-sensor-work.patch => 0019-Petal-Reduce-sensor-work.patch} (100%) rename patches/server/{0021-Akarin-Save-Json-list-asynchronously.patch => 0020-Akarin-Save-Json-list-asynchronously.patch} (100%) rename patches/server/{0022-Slice-Smooth-Teleports.patch => 0021-Slice-Smooth-Teleports.patch} (100%) rename patches/server/{0023-PaperPR-Optimize-VarInts.patch => 0022-PaperPR-Optimize-VarInts.patch} (100%) rename patches/server/{0024-Parchment-Make-FixLight-use-action-bar.patch => 0023-Parchment-Make-FixLight-use-action-bar.patch} (100%) rename patches/server/{0025-Leaves-Server-Utils.patch => 0024-Leaves-Server-Utils.patch} (100%) rename patches/server/{0026-Leaves-Jade-Protocol.patch => 0025-Leaves-Jade-Protocol.patch} (100%) rename patches/server/{0027-Leaves-Appleskin-Protocol.patch => 0026-Leaves-Appleskin-Protocol.patch} (100%) rename patches/server/{0028-Leaves-Xaero-Map-Protocol.patch => 0027-Leaves-Xaero-Map-Protocol.patch} (100%) rename patches/server/{0029-Fix-Make-log4j-compatible-with-future-release.patch => 0028-Fix-Make-log4j-compatible-with-future-release.patch} (100%) rename patches/server/{0030-Fix-compile-error.patch => 0029-Fix-compile-error.patch} (100%) rename patches/{ => unapplied}/server/0019-Petal-reduce-work-done-by-game-event-system.patch (92%) diff --git a/patches/server/0020-Petal-Reduce-sensor-work.patch b/patches/server/0019-Petal-Reduce-sensor-work.patch similarity index 100% rename from patches/server/0020-Petal-Reduce-sensor-work.patch rename to patches/server/0019-Petal-Reduce-sensor-work.patch diff --git a/patches/server/0021-Akarin-Save-Json-list-asynchronously.patch b/patches/server/0020-Akarin-Save-Json-list-asynchronously.patch similarity index 100% rename from patches/server/0021-Akarin-Save-Json-list-asynchronously.patch rename to patches/server/0020-Akarin-Save-Json-list-asynchronously.patch diff --git a/patches/server/0022-Slice-Smooth-Teleports.patch b/patches/server/0021-Slice-Smooth-Teleports.patch similarity index 100% rename from patches/server/0022-Slice-Smooth-Teleports.patch rename to patches/server/0021-Slice-Smooth-Teleports.patch diff --git a/patches/server/0023-PaperPR-Optimize-VarInts.patch b/patches/server/0022-PaperPR-Optimize-VarInts.patch similarity index 100% rename from patches/server/0023-PaperPR-Optimize-VarInts.patch rename to patches/server/0022-PaperPR-Optimize-VarInts.patch diff --git a/patches/server/0024-Parchment-Make-FixLight-use-action-bar.patch b/patches/server/0023-Parchment-Make-FixLight-use-action-bar.patch similarity index 100% rename from patches/server/0024-Parchment-Make-FixLight-use-action-bar.patch rename to patches/server/0023-Parchment-Make-FixLight-use-action-bar.patch diff --git a/patches/server/0025-Leaves-Server-Utils.patch b/patches/server/0024-Leaves-Server-Utils.patch similarity index 100% rename from patches/server/0025-Leaves-Server-Utils.patch rename to patches/server/0024-Leaves-Server-Utils.patch diff --git a/patches/server/0026-Leaves-Jade-Protocol.patch b/patches/server/0025-Leaves-Jade-Protocol.patch similarity index 100% rename from patches/server/0026-Leaves-Jade-Protocol.patch rename to patches/server/0025-Leaves-Jade-Protocol.patch diff --git a/patches/server/0027-Leaves-Appleskin-Protocol.patch b/patches/server/0026-Leaves-Appleskin-Protocol.patch similarity index 100% rename from patches/server/0027-Leaves-Appleskin-Protocol.patch rename to patches/server/0026-Leaves-Appleskin-Protocol.patch diff --git a/patches/server/0028-Leaves-Xaero-Map-Protocol.patch b/patches/server/0027-Leaves-Xaero-Map-Protocol.patch similarity index 100% rename from patches/server/0028-Leaves-Xaero-Map-Protocol.patch rename to patches/server/0027-Leaves-Xaero-Map-Protocol.patch diff --git a/patches/server/0029-Fix-Make-log4j-compatible-with-future-release.patch b/patches/server/0028-Fix-Make-log4j-compatible-with-future-release.patch similarity index 100% rename from patches/server/0029-Fix-Make-log4j-compatible-with-future-release.patch rename to patches/server/0028-Fix-Make-log4j-compatible-with-future-release.patch diff --git a/patches/server/0030-Fix-compile-error.patch b/patches/server/0029-Fix-compile-error.patch similarity index 100% rename from patches/server/0030-Fix-compile-error.patch rename to patches/server/0029-Fix-compile-error.patch diff --git a/patches/server/0019-Petal-reduce-work-done-by-game-event-system.patch b/patches/unapplied/server/0019-Petal-reduce-work-done-by-game-event-system.patch similarity index 92% rename from patches/server/0019-Petal-reduce-work-done-by-game-event-system.patch rename to patches/unapplied/server/0019-Petal-reduce-work-done-by-game-event-system.patch index 71e6eeae..abeb55a0 100644 --- a/patches/server/0019-Petal-reduce-work-done-by-game-event-system.patch +++ b/patches/unapplied/server/0019-Petal-reduce-work-done-by-game-event-system.patch @@ -10,21 +10,8 @@ Original project: https://github.com/Bloom-host/Petal 2. EuclideanGameEventListenerRegistry is not used concurrently so we ban that usage for improved performance with allays -diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 370a25d2deb54f10a35ee24d9e7e92fbfde60edf..fe0dfa85d0e2edb7f2c3b3a12bb9aa651e7ea852 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -193,7 +193,7 @@ public abstract class BlockEntity { - return new CompoundTag(); - } - -- public boolean isRemoved() { -+ public static boolean isRemoved() { - return this.remove; - } - diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java -index a606aed406551f4d3cc0bf09d6e231d87fe00f53..64bb89ff273d73d54dbced93f66a0c73c418adf7 100644 +index a606aed406551f4d3cc0bf09d6e231d87fe00f53..01babdf2c82d019589c38b73a10ad7afeebd32d2 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java @@ -126,6 +126,13 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi @@ -34,7 +21,7 @@ index a606aed406551f4d3cc0bf09d6e231d87fe00f53..64bb89ff273d73d54dbced93f66a0c73 + // petal start + @Override + public boolean listensToEvent(GameEvent gameEvent, GameEvent.Context context) { -+ return !isRemoved() && gameEvent == GameEvent.ENTITY_DIE && context.sourceEntity() instanceof LivingEntity; ++ return !this.isRemoved() && gameEvent == GameEvent.ENTITY_DIE && context.sourceEntity() instanceof LivingEntity; + } + // petal end +