Add Option for disable observer clocks

Allow to disable observer clocks: https://www.spigotmc.org/attachments/observerclock-gif.365936/
This commit is contained in:
DoctaEnkoda
2025-01-12 11:52:16 -08:00
committed by granny
parent 6c32b7a34a
commit 84ffcfcdea
3 changed files with 15 additions and 35 deletions

View File

@@ -0,0 +1,10 @@
--- a/net/minecraft/world/level/block/ObserverBlock.java
+++ b/net/minecraft/world/level/block/ObserverBlock.java
@@ -81,6 +_,7 @@
RandomSource random
) {
if (state.getValue(FACING) == direction && !state.getValue(POWERED)) {
+ if (!level.getWorldBorder().world.purpurConfig.disableObserverClocks || !(neighborState.getBlock() instanceof ObserverBlock) || neighborState.getValue(ObserverBlock.FACING).getOpposite() != direction) // Purpur - Add Option for disable observer clocks
this.startSignal(level, scheduledTickAccess, pos);
}