From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Sat, 23 Jan 2021 19:17:51 -0500 Subject: [PATCH] add config for sand duping diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java index 76aac1b131f314775e418339e434f4f2da2ad619..46aef6e142c7ec0cf2d4ac53a2db4987db6d0d71 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -65,7 +65,7 @@ public class EntityFallingBlock extends Entity { @Override public void tick() { // Paper start - fix sand duping - if (this.dead) { + if (!org.yatopiamc.yatopia.server.YatopiaConfig.allowSandDupe && this.dead) { // Yatopia - add config for sand dupe return; } // Paper end - fix sand duping @@ -92,7 +92,7 @@ public class EntityFallingBlock extends Entity { this.move(EnumMoveType.SELF, this.getMot()); // Paper start - fix sand duping - if (this.dead) { + if (!org.yatopiamc.yatopia.server.YatopiaConfig.allowSandDupe && this.dead) { // Yatopia - add config for sand dupe return; } // Paper end - fix sand duping diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java index c67654e8701b9da6499d442048429149daae7150..ac73a0629347a3d5842f00ee8d28c288acdec375 100644 --- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java +++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java @@ -284,4 +284,8 @@ public class YatopiaConfig { debugNetwork = getBoolean("network.debug", debugNetwork); } + public static boolean allowSandDupe = false; + private static void sandDupe() { + allowSandDupe = getBoolean("settings.allow-sand-dupe", allowSandDupe); + } }