mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Add toggle for sand duping fix
This commit is contained in:
44
patches/server/0223-Add-toggle-for-sand-duping-fix.patch
Normal file
44
patches/server/0223-Add-toggle-for-sand-duping-fix.patch
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: BillyGalbreath <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/EntityFallingBlock.java b/src/main/java/net/minecraft/world/entity/item/EntityFallingBlock.java
|
||||||
|
index 2a61c24dd26edf4c72e977c6024fe233bab08a2f..58d14c70a95057e91766cc6aa060133189e3c096 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/item/EntityFallingBlock.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/item/EntityFallingBlock.java
|
||||||
|
@@ -106,7 +106,7 @@ public class EntityFallingBlock extends Entity {
|
||||||
|
@Override
|
||||||
|
public void tick() {
|
||||||
|
// Paper start - fix sand duping
|
||||||
|
- if (this.dead) {
|
||||||
|
+ if (this.world.purpurConfig.fixSandDuping && this.dead) { // Purpur
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Paper end - fix sand duping
|
||||||
|
@@ -143,7 +143,7 @@ public class EntityFallingBlock extends Entity {
|
||||||
|
this.move(EnumMoveType.SELF, this.getMot());
|
||||||
|
|
||||||
|
// Paper start - fix sand duping
|
||||||
|
- if (this.dead) {
|
||||||
|
+ if (this.world.purpurConfig.fixSandDuping && this.dead) { // Purpur
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Paper end - fix sand duping
|
||||||
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
|
index e72bc4d81e528885dfb129b4718123afa5c16421..f09d10021f2a20331f5ca4898c7c8b39e32ed2d4 100644
|
||||||
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
|
@@ -642,6 +642,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);
|
||||||
Reference in New Issue
Block a user