From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: tr7zw Date: Fri, 31 Jul 2020 21:28:00 -0500 Subject: [PATCH] Allow to change the piston push limit diff --git a/src/main/java/dev/tr7zw/yatopia/YatopiaConfig.java b/src/main/java/dev/tr7zw/yatopia/YatopiaConfig.java index 556cf9f17501f13a19a05bf804edcb9c9bf7fe4e..0eac1342ceba67ca51bed32e4b7c60afbce684d1 100644 --- a/src/main/java/dev/tr7zw/yatopia/YatopiaConfig.java +++ b/src/main/java/dev/tr7zw/yatopia/YatopiaConfig.java @@ -207,4 +207,8 @@ public class YatopiaConfig { disableEntityCollisionboxes = getBoolean("settings.disableEntityCollisionboxes", 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 95aeaaf0bb07c5ecf7117dae3382b0f0aac6426f..89385896af6f6088a9749a13ad5c1d0c581fa502 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() > dev.tr7zw.yatopia.YatopiaConfig.pistonPushLimit) { // Yatopia 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() > dev.tr7zw.yatopia.YatopiaConfig.pistonPushLimit) { // Yatopia return false; } } @@ -141,7 +141,7 @@ public class PistonExtendsChecker { return true; } - if (this.f.size() >= 12) { + if (this.f.size() >= dev.tr7zw.yatopia.YatopiaConfig.pistonPushLimit) { // Yatopia return false; }