mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
IEntity & IWorld:
-Added getStoredDataKeys() & getTempDataKeys() functions.
This commit is contained in:
1 parent
5e8c234ac7
commit
7d4a59d45a
2 files changed
+21
No files matched your search
@@ -511,6 +511,10 @@ public class ScriptEntity<T extends Entity> implements IEntity {
|
||||
tempData.clear();
|
||||
}
|
||||
|
||||
public String[] getTempDataKeys() {
|
||||
return tempData.keySet().toArray(new String[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param key The key of the data to be returned
|
||||
* @return Returns the stored data
|
||||
@@ -572,6 +576,11 @@ public class ScriptEntity<T extends Entity> implements IEntity {
|
||||
entity.getEntityData().removeTag("CNPCStoredData");
|
||||
}
|
||||
|
||||
public String[] getStoredDataKeys() {
|
||||
NBTTagCompound compound = getStoredCompound();
|
||||
return (String[]) compound.func_150296_c().toArray();
|
||||
}
|
||||
|
||||
private NBTTagCompound getStoredCompound(){
|
||||
NBTTagCompound compound = entity.getEntityData().getCompoundTag("CNPCStoredData");
|
||||
if(compound == null)
|
||||
|
||||
Reference in new issue
Block a user