mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-29 14:15:43 +01:00
c09ee99f7e
Closes #257 Ports 2 patches from Purpur: Infinity-bow-settings & Allow-infinite-and-mending-enchantments-together Added an option for infinity with no arrows too. Option for custom locale has come! You can put a locale.json file in your server folder to change it. We've got the finest patches from Hydrinity ( Mykyta approved & allowed ) too. We have some amazing new options in yatopia.yml, we're gonna have documentation for them soon so stay tuned! Last but not least, chunk generation patches. We've tested them extensively so no weirdness happens. Thanks for using Yatopia as your production server software. Co-authored-by: Ivan Pekov <ivan@mrivanplays.com>
52 lines
2.2 KiB
Diff
52 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: tr7zw <tr7zw@live.de>
|
|
Date: Fri, 31 Jul 2020 21:28:00 -0500
|
|
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
|
|
index 95aeaaf0bb07c5ecf7117dae3382b0f0aac6426f..71636ce642efcd3453b6c5bfb2b2ef0edc6baee7 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() > net.yatopia.server.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() > net.yatopia.server.YatopiaConfig.pistonPushLimit) { // Yatopia
|
|
return false;
|
|
}
|
|
}
|
|
@@ -141,7 +141,7 @@ public class PistonExtendsChecker {
|
|
return true;
|
|
}
|
|
|
|
- if (this.f.size() >= 12) {
|
|
+ if (this.f.size() >= net.yatopia.server.YatopiaConfig.pistonPushLimit) { // Yatopia
|
|
return false;
|
|
}
|
|
|
|
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
|
|
index c4dd521d18dd60ec07bdcf0d367b5135710dca58..d69001b126046070abfa96dd3d1e6f95a24af536 100644
|
|
--- a/src/main/java/net/yatopia/server/YatopiaConfig.java
|
|
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
|
|
@@ -190,4 +190,9 @@ public class YatopiaConfig {
|
|
private static void brandName() {
|
|
brandName = getString("brand-name", brandName);
|
|
}
|
|
+
|
|
+ public static int pistonPushLimit = 12;
|
|
+ private static void pistonPushLimit() {
|
|
+ pistonPushLimit = getInt("settings.pistonPushLimit", 12);
|
|
+ }
|
|
}
|