mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-28 11:19:08 +00:00
Fix incorrectly applied change
This commit is contained in:
@@ -72,7 +72,7 @@ index 3e1c7d62c24dd48a805260d156135dc4f0c3d1fc..ced5fb075349a9b944708aeaabe82b33
|
||||
}
|
||||
}
|
||||
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 7dfabb11d3c8112f6daef35d204a2e324f4ddb5e..02fd27b0b9e1d3f1b9f58e7b5057e5fcd961e11a 100644
|
||||
index 7dfabb11d3c8112f6daef35d204a2e324f4ddb5e..ce71e1d2a311e812ccea23467500ea45680be2d4 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
|
||||
@@ -54,6 +54,60 @@ public abstract class BlockEntity {
|
||||
@@ -90,16 +90,16 @@ index 7dfabb11d3c8112f6daef35d204a2e324f4ddb5e..02fd27b0b9e1d3f1b9f58e7b5057e5fc
|
||||
+ }
|
||||
+
|
||||
+ public final boolean isBlockEntityActive() {
|
||||
+ this.tickCount++;
|
||||
+ return this.blockEntityTicking;
|
||||
+ }
|
||||
+
|
||||
+ public final void setBlockEntityTicking(boolean blockEntityTicking) {
|
||||
+ // For some reason the update method is not always called.
|
||||
+ // Activate the block entity every minute in case there's any issues.
|
||||
+ if (!this.blockEntityTicking && this.tickCount > 1200) {
|
||||
+ this.setBlockEntityTicking(true);
|
||||
+ }
|
||||
+ this.tickCount++;
|
||||
+ return this.blockEntityTicking;
|
||||
+ }
|
||||
+
|
||||
+ public final void setBlockEntityTicking(boolean blockEntityTicking) {
|
||||
+ this.tickCount = 0;
|
||||
+ this.blockEntityTicking = blockEntityTicking;
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user