Files
Purpur/patches/server/0182-Add-toggle-for-sand-duping-fix.patch
granny 67066cdd46 [ci-skip] remove unused config option
not sure why we didn't do this during the 1.19.2 update
2023-03-14 21:56:53 -07:00

45 lines
2.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Fri, 4 Jun 2021 09:13:54 -0500
Subject: [PATCH] Add toggle for sand duping fix
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
index eacb8a407fe99af2c13f23c12b5544696bda8890..39d06a704d2ddee0010ba2686c703f21640da998 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -130,7 +130,7 @@ public class FallingBlockEntity extends Entity {
@Override
public void tick() {
// Paper start - fix sand duping
- if (this.isRemoved()) {
+ if (this.level.purpurConfig.fixSandDuping && this.isRemoved()) { // Purpur
return;
}
// Paper end - fix sand duping
@@ -147,7 +147,7 @@ public class FallingBlockEntity extends Entity {
this.move(MoverType.SELF, this.getDeltaMovement());
// Paper start - fix sand duping
- if (this.isRemoved()) {
+ if (this.level.purpurConfig.fixSandDuping && this.isRemoved()) { // Purpur
return;
}
// Paper end - fix sand duping
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index e794a6234acfd47a42f4a47270b2f44e537c5a79..cfc9b8215ebfb3245488235e208160507b0ed121 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -701,6 +701,11 @@ public class PurpurWorldConfig {
}
}
+ public boolean fixSandDuping = true;
+ private void sandSettings() {
+ fixSandDuping = getBoolean("blocks.sand.fix-duping", fixSandDuping);
+ }
+
public boolean shulkerBoxAllowOversizedStacks = false;
private void shulkerBoxSettings() {
shulkerBoxAllowOversizedStacks = getBoolean("blocks.shulker_box.allow-oversized-stacks", shulkerBoxAllowOversizedStacks);