mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-06 10:50:08 +01:00
60 lines
2.2 KiB
Diff
60 lines
2.2 KiB
Diff
|
From 57f33a9c1b3edc95b89073c30746a1dd7215e466 Mon Sep 17 00:00:00 2001
|
||
|
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
|
||
|
index 071e9f9a5..716b2dea9 100644
|
||
|
--- a/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
||
|
+++ b/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
||
|
@@ -211,5 +211,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
|
||
|
index 95aeaaf0b..dd64aad1e 100644
|
||
|
--- 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
|
||
|
|