mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
NpcAPI:
Added createItemFromNBT(INbt) function.
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user