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: b79bc31 Fix MerchantOffer BuyB Only AssertionError (#6206) d6c81c8 Don't apply cramming damage to players (#5903) 12942dc Add rate options and timings for sensors and behaviors (#6027) fc47872 Use mapped names for sensor and behavior timings/config (#6228) c75a837 Don't expose ASM in API (#6229) c225bf9 Fix book title and author being improperly serialized as components (#6190) f25facb Update email & name (DenWav) 44516b1 [ci skip] Put mappings util in a separate class to the stacktrace deobfuscator
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 f380659b261253e327f018ce9b54b15195ad65d7..080449cf3aa0394bd179e26fda8d7248f488ea8d 100644
|
|
--- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
|
+++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
|
@@ -341,7 +341,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 aa9bed62b71894b74f86ee1016d192293a702fd1..fc26cfc19f0af721eb9030cff691c4d65df06415 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -372,6 +372,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);
|
|
@@ -388,6 +389,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;
|