From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: MartijnMuijsers Date: Tue, 29 Nov 2022 16:06:11 +0100 Subject: [PATCH] Make sand duping fix configurable License: MIT (https://opensource.org/licenses/MIT) This patch is based on the following patch: "Add toggle for sand duping fix" By: William Blake Galbreath As part of: Purpur (https://github.com/PurpurMC/Purpur) Licensed under: MIT (https://opensource.org/licenses/MIT) 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 b2d1a17867cdbaad0c6e5c2376c716f9461af124..9d8a8dd2e6ec76beb6552266da7ae7c1229516fd 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java @@ -128,7 +128,7 @@ public class FallingBlockEntity extends Entity { @Override public void tick() { // Paper start - fix sand duping - if (this.isRemoved()) { + if (this.level.galeConfig().gameplayMechanics.fixes.sandDuping && this.isRemoved()) { // Gale - Purpur - make sand duping fix configurable return; } // Paper end - fix sand duping @@ -145,7 +145,7 @@ public class FallingBlockEntity extends Entity { this.move(MoverType.SELF, this.getDeltaMovement()); // Paper start - fix sand duping - if (this.isRemoved()) { + if (this.level.galeConfig().gameplayMechanics.fixes.sandDuping && this.isRemoved()) { // Gale - Purpur - make sand duping fix configurable return; } // Paper end - fix sand duping diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java index 9ac9873c4ffcbc88daf5ca3947cd60177cb0fe5d..82946c6784b9b42681e03a815d82931ae150aaba 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java @@ -241,4 +241,16 @@ public class GaleWorldConfiguration extends ConfigurationPart { } + public GameplayMechanics gameplayMechanics; + public class GameplayMechanics extends ConfigurationPart { + + public Fixes fixes; + public class Fixes extends ConfigurationPart { + + public boolean sandDuping = true; // Gale - Purpur - make sand duping fix configurable + + } + + } + }