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.
This commit is contained in:
Newwind
2024-08-22 22:55:37 +02:00
parent 8a940ca0ba
commit 34c99b8c67
2 changed files with 28 additions and 0 deletions

View File

@@ -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))