Added createItemFromNBT(INbt) function.
This commit is contained in:
Luis C.M committed 2022-12-14 16:44:13 -06:00
1 parent 3152cf2379
commit 3945e7ffb8
1 file changed
+4
@@ -319,6 +319,10 @@ public class NpcAPI extends AbstractNpcAPI {
}
}
public IItemStack createItemFromNBT(INbt nbt) {
return getIItemStack(ItemStack.loadItemStackFromNBT(nbt.getMCNBT()));
}
public IItemStack createItem(String id, int damage, int size) {
Item item = (Item) Item.itemRegistry.getObject(id);
if (item == null)