48 lines
2.6 KiB
Diff
48 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 915ac0ab2fc4ee2cdeeaac821a28ed861f9e6c12..91749e471488233dd4f2515b1ff51331dea90f53 100644
|
|
--- a/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java
|
|
+++ b/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java
|
|
@@ -154,6 +154,7 @@ public class KaiijuWorldConfig {
|
|
public boolean fixTripWireStateInconsistency = true;
|
|
public boolean enableEntityThrottling = false;
|
|
public boolean safeTeleporting = true;
|
|
+ public boolean sandDuplication = false;
|
|
|
|
private void gameplaySettings() {
|
|
shulkerBoxDropContentsWhenDestroyed = getBoolean("gameplay.shulker-box-drop-contents-when-destroyed", shulkerBoxDropContentsWhenDestroyed);
|
|
@@ -164,5 +165,6 @@ public class KaiijuWorldConfig {
|
|
fixTripWireStateInconsistency = getBoolean("gameplay.fix-tripwire-state-inconsistency", fixTripWireStateInconsistency);
|
|
enableEntityThrottling = getBoolean("gameplay.enable-entity-throttling", enableEntityThrottling);
|
|
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 6e35afb9e5314de69e78d819913418ab144bec52..6cff3410c2851aeb808994a4bf830a0db32a9a37 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
|
@@ -131,7 +131,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
|
|
@@ -148,7 +148,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
|