2020-07-17 18:05:50 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2020-06-27 17:50:15 +02:00
|
|
|
From: tr7zw <tr7zw@live.de>
|
2020-08-03 18:48:42 +02:00
|
|
|
Date: Fri, 31 Jul 2020 21:28:00 -0500
|
2020-06-27 17:50:15 +02:00
|
|
|
Subject: [PATCH] Allow to change the piston push limit
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PistonExtendsChecker.java b/src/main/java/net/minecraft/server/PistonExtendsChecker.java
|
2020-12-02 07:35:11 +01:00
|
|
|
index 95aeaaf0bb07c5ecf7117dae3382b0f0aac6426f..ae28b1f6ef56ab2199e1cf8d4f7d3f3e12496545 100644
|
2020-06-27 17:50:15 +02: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) {
|
2020-12-02 07:35:11 +01:00
|
|
|
+ if (i + this.f.size() > org.yatopiamc.yatopia.server.YatopiaConfig.pistonPushLimit) { // Yatopia
|
2020-06-27 17:50:15 +02:00
|
|
|
return false;
|
|
|
|
} else {
|
|
|
|
while (a(block)) {
|
|
|
|
@@ -93,7 +93,7 @@ public class PistonExtendsChecker {
|
|
|
|
}
|
|
|
|
|
|
|
|
++i;
|
|
|
|
- if (i + this.f.size() > 12) {
|
2020-12-02 07:35:11 +01:00
|
|
|
+ if (i + this.f.size() > org.yatopiamc.yatopia.server.YatopiaConfig.pistonPushLimit) { // Yatopia
|
2020-06-27 17:50:15 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -141,7 +141,7 @@ public class PistonExtendsChecker {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (this.f.size() >= 12) {
|
2020-12-02 07:35:11 +01:00
|
|
|
+ if (this.f.size() >= org.yatopiamc.yatopia.server.YatopiaConfig.pistonPushLimit) { // Yatopia
|
2020-06-27 17:50:15 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2020-12-02 07:35:11 +01:00
|
|
|
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
|
|
index f5a43e607f9c13e07a0f5e7e139eed93f159185b..415f7def834399ab94edc380b8201058b424fe45 100644
|
|
|
|
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
|
|
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
|
|
|
|
@@ -189,4 +189,9 @@ public class YatopiaConfig {
|
2020-09-13 09:00:43 +02:00
|
|
|
private static void brandName() {
|
|
|
|
brandName = getString("brand-name", brandName);
|
2020-09-01 08:38:17 +02:00
|
|
|
}
|
2020-09-13 09:00:43 +02:00
|
|
|
+
|
2020-09-01 08:38:17 +02:00
|
|
|
+ public static int pistonPushLimit = 12;
|
|
|
|
+ private static void pistonPushLimit() {
|
|
|
|
+ pistonPushLimit = getInt("settings.pistonPushLimit", 12);
|
|
|
|
+ }
|
|
|
|
}
|