-
-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to disable the copper oxidation proximity penalty
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
patches/server/0305-Add-option-to-disable-the-copper-oxidation-proximity.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Meln Cat <[email protected]> | ||
Date: Mon, 9 Oct 2023 12:21:49 -0700 | ||
Subject: [PATCH] Add option to disable the copper oxidation proximity penalty | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/world/level/block/ChangeOverTimeBlock.java b/src/main/java/net/minecraft/world/level/block/ChangeOverTimeBlock.java | ||
index 8512b977b44a0a4d3a2521e27a60d65f7ac967be..dd270f67388c8663e0418875c88cb1e2a55d0635 100644 | ||
--- a/src/main/java/net/minecraft/world/level/block/ChangeOverTimeBlock.java | ||
+++ b/src/main/java/net/minecraft/world/level/block/ChangeOverTimeBlock.java | ||
@@ -65,7 +65,7 @@ public interface ChangeOverTimeBlock<T extends Enum<T>> { | ||
} | ||
|
||
float f = (float) (k + 1) / (float) (k + j + 1); | ||
- float f1 = f * f * this.getChanceModifier(); | ||
+ float f1 = world.purpurConfig.disableOxidationProximityPenalty ? this.getChanceModifier() : f * f * this.getChanceModifier(); // Purpur | ||
|
||
if (random.nextFloat() < f1) { | ||
this.getNext(state).ifPresent((iblockdata2) -> { | ||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java | ||
index d4d9f748d259df8b6f4566efa21c15c470de5ba2..64e172e6cbfb8134c2b36bce8279e1ef44085257 100644 | ||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java | ||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java | ||
@@ -145,6 +145,7 @@ public class PurpurWorldConfig { | ||
public boolean rainStopsAfterSleep = true; | ||
public boolean thunderStopsAfterSleep = true; | ||
public int mobLastHurtByPlayerTime = 100; | ||
+ public boolean disableOxidationProximityPenalty = false; | ||
private void miscGameplayMechanicsSettings() { | ||
useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending); | ||
mendingMultiplier = getDouble("gameplay-mechanics.mending-multiplier", mendingMultiplier); | ||
@@ -173,6 +174,7 @@ public class PurpurWorldConfig { | ||
rainStopsAfterSleep = getBoolean("gameplay-mechanics.rain-stops-after-sleep", rainStopsAfterSleep); | ||
thunderStopsAfterSleep = getBoolean("gameplay-mechanics.thunder-stops-after-sleep", thunderStopsAfterSleep); | ||
mobLastHurtByPlayerTime = getInt("gameplay-mechanics.mob-last-hurt-by-player-time", mobLastHurtByPlayerTime); | ||
+ disableOxidationProximityPenalty = getBoolean("gameplay-mechanics.disable-oxidation-proximity-penalty", disableOxidationProximityPenalty); | ||
} | ||
|
||
public int daytimeTicks = 12000; |