mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-24 18:44:26 +00:00
Added ScriptBlock and ScriptNbt support to scripting API
This commit is contained in:
1 parent
6752f8baec
commit
699182f4c0
9 files changed
+339
-4
No files matched your search
@@ -199,6 +199,21 @@ public class ScriptItemStack implements IItemStack {
|
||||
return true;
|
||||
}
|
||||
|
||||
public INbt getNbt() {
|
||||
NBTTagCompound compound = this.item.getTagCompound();
|
||||
if(compound == null) {
|
||||
this.item.setTagCompound(compound = new NBTTagCompound());
|
||||
}
|
||||
|
||||
return NpcAPI.Instance().getINbt(compound);
|
||||
}
|
||||
|
||||
public INbt getItemNbt() {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
this.item.writeToNBT(compound);
|
||||
return NpcAPI.Instance().getINbt(compound);
|
||||
}
|
||||
|
||||
/**
|
||||
* No support is given for this method. Dont use if you dont know what you are doing.
|
||||
* @return Minecraft ItemStack
|
||||
|
||||
Reference in new issue
Block a user