mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 12dec20 Bump paerweight to 1.1.7 e33ed89 Get short commit ref using a more proper method 7d6147d Remove now unneeded patch due to paperweight 1.1.7 e72fa41 Update task dependency for includeMappings so the new task isn't skipped 0ad5526 Trim whitspace off of git hash (oops) Tuinity Changes: e878ba9 Update paper 2bd2849 Bring back fix codec spam patch
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 2dbc71a3d76cc87e2683b8f351bd8db04481855e..44ecc27fd9bd5a02656321cf8c69bbaea7a04640 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 598f058a5719e5f12467cb04a38e8aad3332a7c7..cd5a0a47fe705b7ef9e257f9fd89d3a7b660af5c 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -324,6 +324,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);
|
|
@@ -340,6 +341,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;
|