From f9f3a2f2f7edf1b63164beb7148938cfdb49574c Mon Sep 17 00:00:00 2001 From: Samsuik Date: Fri, 7 Mar 2025 20:26:31 +0000 Subject: [PATCH] Fix incorrectly applied change --- patches/server/0076-Optimise-hopper-ticking.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/patches/server/0076-Optimise-hopper-ticking.patch b/patches/server/0076-Optimise-hopper-ticking.patch index 82d8a2b..33b4678 100644 --- a/patches/server/0076-Optimise-hopper-ticking.patch +++ b/patches/server/0076-Optimise-hopper-ticking.patch @@ -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; + }