Drop sand duping

This commit is contained in:
ishland 2021-01-28 10:29:57 +08:00
parent a5a825760d
commit 42720aa1a7
7 changed files with 6 additions and 43 deletions

View File

@ -367,7 +367,6 @@ # Patches
| server | Zombie break door minimum difficulty option | BillyGalbreath | |
| server | Zombie horse naturally spawn | William Blake Galbreath | |
| server | add config for logging login location | Simon Gardling | |
| server | add config for sand duping | Simon Gardling | |
| server | dont load chunks for physics | Aikar | |
| server | lithium DataTrackerMixin | JellySquid | tr7zw |
| server | lithium HashedList | JellySquid | |

View File

@ -70,7 +70,12 @@ private fun Project.updatePatches(
"--no-stat", "--zero-commit", "--full-index", "--no-signature", "-N",
"-o", patchPath.absolutePath, previousUpstreamName,
dir = projectDir,
printOut = true
printOut = false
)
)
gitCmd(
"add", patchPath.canonicalPath,
dir = patchPath,
printOut = true
)
}

View File

@ -1,41 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Simon Gardling <titaniumtown@gmail.com>
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 15e2fa125bc293b954cceb5b1fbcec7fade3e4db..eb4afe26ff5e436cf08513f512ebdf126407b6ae 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -276,4 +276,8 @@ public class YatopiaConfig {
fixProtocolLib = getBoolean("settings.fix-protocollib", fixProtocolLib);
}
+ public static boolean allowSandDupe = false;
+ private static void sandDupe() {
+ allowSandDupe = getBoolean("settings.allow-sand-dupe", allowSandDupe);
+ }
}