mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-23 17:09:29 +00:00
Readd Petal's Reduce sensor work patch
This commit is contained in:
@@ -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
|
||||
+
|
||||
Reference in New Issue
Block a user