From 0000000000000000000000000000000000000000 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. diff --git a/src/main/java/net/minecraft/data/loot/packs/VanillaChestLoot.java b/src/main/java/net/minecraft/data/loot/packs/VanillaChestLoot.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/data/loot/packs/VanillaChestLoot.java +++ b/src/main/java/net/minecraft/data/loot/packs/VanillaChestLoot.java @@ -0,0 +0,0 @@ public record VanillaChestLoot(HolderLookup.Provider registries) implements Loot .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)) diff --git a/src/main/resources/data/minecraft/loot_table/chests/trial_chambers/intersection_barrel.json b/src/main/resources/data/minecraft/loot_table/chests/trial_chambers/intersection_barrel.json index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/resources/data/minecraft/loot_table/chests/trial_chambers/intersection_barrel.json +++ b/src/main/resources/data/minecraft/loot_table/chests/trial_chambers/intersection_barrel.json @@ -0,0 +0,0 @@ "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"