Delete 0062-Option-for-disable-observer-clocks.patch

This commit is contained in:
Etil
2021-09-26 17:17:56 +02:00
committed by GitHub
parent 64ab66223b
commit 30e925028e

View File

@@ -1,35 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Etil <81570777+etil2jz@users.noreply.github.com>
Date: Sun, 26 Sep 2021 16:53:11 +0200
Subject: [PATCH] Option for disable observer clocks
diff --git a/src/main/java/net/minecraft/world/level/block/ObserverBlock.java b/src/main/java/net/minecraft/world/level/block/ObserverBlock.java
index 101317912b8299f5be406b75c19cfddb30c1f3f3..3a9127aec3180524b047c575dba3e5422e71e0b2 100644
--- a/src/main/java/net/minecraft/world/level/block/ObserverBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ObserverBlock.java
@@ -64,6 +64,7 @@ public class ObserverBlock extends DirectionalBlock {
@Override
public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
if (state.getValue(ObserverBlock.FACING) == direction && !(Boolean) state.getValue(ObserverBlock.POWERED)) {
+ if (!xyz.arthurb.mirai.MiraiConfig.disableObserverClocks || !(neighborState.getBlock() instanceof ObserverBlock) || neighborState.getValue(ObserverBlock.FACING).getOpposite() != direction) // Mirai - disable observer clocks
this.startSignal(world, pos);
}
diff --git a/src/main/java/xyz/arthurb/mirai/MiraiConfig.java b/src/main/java/xyz/arthurb/mirai/MiraiConfig.java
index 0888a159b08b49ea333d88e1c110c0f9ea707f27..d1275cb9f1df9afda081e993c2de74fb4829b2b7 100644
--- a/src/main/java/xyz/arthurb/mirai/MiraiConfig.java
+++ b/src/main/java/xyz/arthurb/mirai/MiraiConfig.java
@@ -221,5 +221,11 @@ public class MiraiConfig {
private static void useAlternateKeepAlive() {
useAlternateKeepAlive = getBoolean("settings.use-alternate-keepalive", useAlternateKeepAlive);
}
+
+ public static boolean disableObserverClocks = false;
+
+ private void observerSettings() {
+ this.disableObserverClocks = getBoolean("settings.disable-observer-clocks", disableObserverClocks);
+ }
}
\ No newline at end of file