From 34c99b8c67792931e3865ae773cf8ff881d11ded Mon Sep 17 00:00:00 2001 From: Newwind Date: Thu, 22 Aug 2024 22:55:37 +0200 Subject: [PATCH] Remove set damage lootable item function from compasses In VanillaChestLoot, compasses accidentally have a setdamage loot function on them, but compasses don't take durability, resulting in a warning. This patch simply removes attempting to add damage to the compass item. --- .../intersection_barrel.json.patch | 18 ++++++++++++++++++ .../loot/packs/VanillaChestLoot.java.patch | 10 ++++++++++ 2 files changed, 28 insertions(+) create mode 100644 paper-server/patches/resources/data/minecraft/loot_table/chests/trial_chambers/intersection_barrel.json.patch create mode 100644 paper-server/patches/sources/net/minecraft/data/loot/packs/VanillaChestLoot.java.patch diff --git a/paper-server/patches/resources/data/minecraft/loot_table/chests/trial_chambers/intersection_barrel.json.patch b/paper-server/patches/resources/data/minecraft/loot_table/chests/trial_chambers/intersection_barrel.json.patch new file mode 100644 index 0000000000..572f83673b --- /dev/null +++ b/paper-server/patches/resources/data/minecraft/loot_table/chests/trial_chambers/intersection_barrel.json.patch @@ -0,0 +1,18 @@ +--- a/data/minecraft/loot_table/chests/trial_chambers/intersection_barrel.json ++++ b/data/minecraft/loot_table/chests/trial_chambers/intersection_barrel.json +@@ -70,15 +70,6 @@ + "add": false, + "count": 1.0, + "function": "minecraft:set_count" +- }, +- { +- "add": false, +- "damage": { +- "type": "minecraft:uniform", +- "max": 0.8, +- "min": 0.15 +- }, +- "function": "minecraft:set_damage" + } + ], + "name": "minecraft:compass" diff --git a/paper-server/patches/sources/net/minecraft/data/loot/packs/VanillaChestLoot.java.patch b/paper-server/patches/sources/net/minecraft/data/loot/packs/VanillaChestLoot.java.patch new file mode 100644 index 0000000000..02e103aaf6 --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/data/loot/packs/VanillaChestLoot.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/data/loot/packs/VanillaChestLoot.java ++++ b/net/minecraft/data/loot/packs/VanillaChestLoot.java +@@ -946,7 +946,6 @@ + .add( + LootItem.lootTableItem(Items.COMPASS) + .apply(SetItemCountFunction.setCount(ConstantValue.exactly(1.0F))) +- .apply(SetItemDamageFunction.setDamage(UniformGenerator.between(0.15F, 0.8F))) + .setWeight(1) + ) + .add(LootItem.lootTableItem(Items.BUCKET).apply(SetItemCountFunction.setCount(UniformGenerator.between(1.0F, 2.0F))).setWeight(1))