mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
Added getAllNbt function to ScriptEntity.
This commit is contained in:
1 parent
40e738384f
commit
b15f5221fd
1 file changed
+6
@@ -502,6 +502,12 @@ public class ScriptEntity<T extends Entity> implements IEntity {
|
||||
return NpcAPI.Instance().getINbt(this.entity.getEntityData());
|
||||
}
|
||||
|
||||
public INbt getAllNbt() {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
this.entity.writeToNBT(compound);
|
||||
return NpcAPI.Instance().getINbt(compound);
|
||||
}
|
||||
|
||||
public void setNbt(INbt nbt) {
|
||||
this.entity.readFromNBT(nbt.getMCNBT());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user