47 lines
2.6 KiB
Diff
47 lines
2.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: "Sofiane H. Djerbi" <46628754+kugge@users.noreply.github.com>
|
|
Date: Sun, 28 May 2023 01:51:52 +0300
|
|
Subject: [PATCH] Toggle sand duplication
|
|
|
|
|
|
diff --git a/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java b/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java
|
|
index 7c6c74f95c2534624a928ccf6b0a4b9d2a5486ad..9f0095f2196133a8bcffd5306aa9ac0b99b2f8d7 100644
|
|
--- a/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java
|
|
+++ b/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java
|
|
@@ -162,11 +162,13 @@ public class KaiijuWorldConfig {
|
|
public boolean breakRedstoneOnTopOfTrapDoorsEarly = true;
|
|
public boolean fixTripWireStateInconsistency = true;
|
|
public boolean safeTeleporting = true;
|
|
+ public boolean sandDuplication = false;
|
|
|
|
private void gameplaySettings() {
|
|
fixVoidTrading = getBoolean("gameplay.fix-void-trading", fixVoidTrading);
|
|
breakRedstoneOnTopOfTrapDoorsEarly = getBoolean("gameplay.break-redstone-on-top-of-trap-doors-early", breakRedstoneOnTopOfTrapDoorsEarly);
|
|
fixTripWireStateInconsistency = getBoolean("gameplay.fix-tripwire-state-inconsistency", fixTripWireStateInconsistency);
|
|
safeTeleporting = getBoolean("gameplay.safe-teleportation", safeTeleporting);
|
|
+ sandDuplication = getBoolean("gameplay.sand-duplication", sandDuplication);
|
|
}
|
|
}
|
|
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 34b3541603b8cca16c7d62f3981d7ce3e8be0dbe..87d08f4d5bdec0ef96c0e4a91a2f595d2b0f0026 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
|
@@ -133,7 +133,7 @@ public class FallingBlockEntity extends Entity {
|
|
@Override
|
|
public void tick() {
|
|
// Paper start - fix sand duping
|
|
- if (this.isRemoved()) {
|
|
+ if (!this.level().kaiijuConfig.sandDuplication && this.isRemoved()) { // Kaiiju - Toggle sand duplication
|
|
return;
|
|
}
|
|
// Paper end - fix sand duping
|
|
@@ -150,7 +150,7 @@ public class FallingBlockEntity extends Entity {
|
|
this.move(MoverType.SELF, this.getDeltaMovement());
|
|
|
|
// Paper start - fix sand duping
|
|
- if (this.isRemoved()) {
|
|
+ if (!this.level().kaiijuConfig.sandDuplication && this.isRemoved()) { // Kaiiju - Toggle sand duplication
|
|
return;
|
|
}
|
|
// Paper end - fix sand duping
|