mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-30 01:34:04 +00:00
Look loot items up by their namespaced key
This commit is contained in:
1 parent
1ab8aeff9e
commit
da77a04fd0
1 file changed
+6
-1
@@ -96,7 +96,12 @@ public final class BukkitItemStacks {
|
|||||||
stack.setAmount(drop.amount());
|
stack.setAmount(drop.amount());
|
||||||
return stack;
|
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) {
|
private static KMap<String, Object> customNbtOf(ItemDrop drop) {
|
||||||
|
|||||||
Reference in new issue
Block a user