2020-06-23 01:09:14 +02:00
|
|
|
From c4fc28ab2dbdd7291b59b7965ca1b63b4e44cfc4 Mon Sep 17 00:00:00 2001
|
2020-03-29 00:36:07 +01:00
|
|
|
From: tr7zw <tr7zw@live.de>
|
|
|
|
Date: Sun, 29 Mar 2020 00:35:03 +0100
|
|
|
|
Subject: [PATCH] Allow to change the piston push limit
|
|
|
|
|
|
|
|
---
|
|
|
|
src/main/java/de/tr7zw/yapfa/YapfaConfig.java | 4 ++++
|
|
|
|
.../java/net/minecraft/server/PistonExtendsChecker.java | 6 +++---
|
|
|
|
2 files changed, 7 insertions(+), 3 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/src/main/java/de/tr7zw/yapfa/YapfaConfig.java b/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
2020-06-16 16:46:05 +02:00
|
|
|
index 655c4e68f..29587589c 100644
|
2020-03-29 00:36:07 +01:00
|
|
|
--- a/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
|
|
|
+++ b/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
|
|
|
@@ -221,5 +221,9 @@ public class YapfaConfig {
|
|
|
|
onlyPlayerCollisions = getBoolean("settings.onlyPlayerCollisions", false);
|
|
|
|
}
|
|
|
|
|
|
|
|
+ public static int pistonPushLimit = 12;
|
|
|
|
+ private static void pistonPushLimit() {
|
|
|
|
+ pistonPushLimit = getInt("settings.pistonPushLimit", 12);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
}
|
|
|
|
\ No newline at end of file
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PistonExtendsChecker.java b/src/main/java/net/minecraft/server/PistonExtendsChecker.java
|
2020-06-16 16:46:05 +02:00
|
|
|
index 8ac7d30be..de1c98cca 100644
|
2020-03-29 00:36:07 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/PistonExtendsChecker.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PistonExtendsChecker.java
|
|
|
|
@@ -79,7 +79,7 @@ public class PistonExtendsChecker {
|
|
|
|
} else {
|
|
|
|
int i = 1;
|
|
|
|
|
|
|
|
- if (i + this.f.size() > 12) {
|
|
|
|
+ if (i + this.f.size() > de.tr7zw.yapfa.YapfaConfig.pistonPushLimit) { // YAPFA
|
|
|
|
return false;
|
|
|
|
} else {
|
|
|
|
while (a(block)) {
|
|
|
|
@@ -93,7 +93,7 @@ public class PistonExtendsChecker {
|
|
|
|
}
|
|
|
|
|
|
|
|
++i;
|
|
|
|
- if (i + this.f.size() > 12) {
|
|
|
|
+ if (i + this.f.size() > de.tr7zw.yapfa.YapfaConfig.pistonPushLimit) { // YAPFA
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -141,7 +141,7 @@ public class PistonExtendsChecker {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (this.f.size() >= 12) {
|
|
|
|
+ if (this.f.size() >= de.tr7zw.yapfa.YapfaConfig.pistonPushLimit) { // YAPFA
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
|
|
|
2.25.1.windows.1
|
|
|
|
|