mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes:05cb10c56fAdd repo for Velocity natives to dev bundle (#6536)7bd7b18811Configurable feature seeds (#6531)ca708a0944Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6539)f02d3d8989flattener should try to render custom translations (#6540)1276bd5039Fixed layers from V2550 not being added to list (#6541)a763f258dadocs: remove Paper tool method for patch mods20903fcf5edocs: drop table of contents; it's built into GH
40 lines
2.2 KiB
Diff
40 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: 12emin34 <macanovic.emin@gmail.com>
|
|
Date: Fri, 21 May 2021 16:58:45 +0200
|
|
Subject: [PATCH] Make anvil cumulative cost configurable
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
|
index bb80328af5051cc01609dfd79b749d9acd2d69ac..9dd5dfc95049de84916bbbd63acb6125ec9ee0a0 100644
|
|
--- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
|
+++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
|
@@ -342,7 +342,7 @@ public class AnvilMenu extends ItemCombinerMenu {
|
|
}
|
|
|
|
public static int calculateIncreasedRepairCost(int cost) {
|
|
- return cost * 2 + 1;
|
|
+ return net.pl3x.purpur.PurpurConfig.anvilCumulativeCost ? cost * 2 + 1 : 0;
|
|
}
|
|
|
|
public void setItemName(String newItemName) {
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
index 6f778d5725b05430598628ff34a7b99a8a400d93..72860c591af31efbdf50b8ce606ef009c62b1610 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -257,6 +257,7 @@ public class PurpurConfig {
|
|
public static boolean enderChestPermissionRows = false;
|
|
public static boolean cryingObsidianValidForPortalFrame = false;
|
|
public static int beeInsideBeeHive = 3;
|
|
+ public static boolean anvilCumulativeCost = true;
|
|
private static void blockSettings() {
|
|
if (version < 3) {
|
|
boolean oldValue = getBoolean("settings.barrel.packed-barrels", true);
|
|
@@ -289,6 +290,7 @@ public class PurpurConfig {
|
|
enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows);
|
|
cryingObsidianValidForPortalFrame = getBoolean("settings.blocks.crying_obsidian.valid-for-portal-frame", cryingObsidianValidForPortalFrame);
|
|
beeInsideBeeHive = getInt("settings.blocks.beehive.max-bees-inside", beeInsideBeeHive);
|
|
+ anvilCumulativeCost = getBoolean("settings.blocks.anvil.cumulative-cost", anvilCumulativeCost);
|
|
}
|
|
|
|
public static boolean allowInfinityMending = false;
|