Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
spthiel committed Oct 4, 2019
1 parent 4b619b7 commit f1857f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public boolean superclassOf(Entity entity) {
}

public void addVariable(ScriptedIteratorEntities iterator, String key, Object object) {
iterator.addVar("ENTITY" + key.toUpperCase(),object);
iterator.addVar("ENTITY" + key.toUpperCase(), object);
}

abstract public void addVariables(ScriptedIteratorEntities iterator, Entity entity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public void addVariables(ScriptedIteratorEntities iterator, Entity entity) {
entity.writeToNBT(nbt);
addVariable(iterator, "nbt", nbt.toString());
Set<String> keys = nbt.getKeySet();
String[] keyArray = nbt.getKeySet().toArray(new String[keys.size()]);
addVariable(iterator, "nbtkeys", keyArray);
for (String key : keyArray) {
ArrayList<String> keyList = new ArrayList<>(keys);
addVariable(iterator, "nbtkeys", keyList);
for (String key : keyList) {
addVariable(iterator, "nbt" + key.replaceAll(" ",""), nbt.getTag(key).toString());
}

Expand Down

0 comments on commit f1857f6

Please sign in to comment.