Look loot items up by their namespaced key

This commit is contained in:
piexel committed 2026-11-10 17:32:13 +01:00
1 parent 1ab8aeff9e
commit da77a04fd0
1 file changed
+6 -1
@@ -96,7 +96,12 @@ public final class BukkitItemStacks {
stack.setAmount(drop.amount());
return stack;
}
return new ItemStack(BukkitBlockResolution.getMaterial(drop.item().toString()), drop.amount());
Material material = Material.matchMaterial(drop.item().toString());
if (material == null) {
IrisLogging.warnOnce("loot:material:" + drop.item(), "Unknown Material: %s", drop.item());
return null;
}
return new ItemStack(material, drop.amount());
}
private static KMap<String, Object> customNbtOf(ItemDrop drop) {