Skip to content

Commit

Permalink
improve shoot command def tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Nov 24, 2019
1 parent 0a450b2 commit 129b8c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Expand Up @@ -310,13 +310,13 @@ public void run() {
ScriptQueue queue = new InstantQueue(script.getContainer().getName())
.addEntries(entries);
if (lastEntity.getLocation() != null) {
queue.addDefinition("location", lastEntity.getLocation().identify());
queue.addDefinition("location", lastEntity.getLocation());
}
else {
queue.addDefinition("location", lastLocation.identify());
queue.addDefinition("location", lastLocation);
}
queue.addDefinition("pushed_entities", entityList.toString());
queue.addDefinition("last_entity", lastEntity.identify());
queue.addDefinition("pushed_entities", entityList);
queue.addDefinition("last_entity", lastEntity);
if (definitions != null) {
int x = 1;
String[] definition_names = null;
Expand Down
Expand Up @@ -377,9 +377,9 @@ else if (lastLocation != null && lastVelocity != null) {
.addEntries(entries);

// Add relevant definitions
queue.addDefinition("location", lastLocation.identify());
queue.addDefinition("shot_entities", entityList.toString());
queue.addDefinition("last_entity", lastEntity.identify());
queue.addDefinition("location", lastLocation);
queue.addDefinition("shot_entities", entityList);
queue.addDefinition("last_entity", lastEntity);

// Handle hit_entities definition
ListTag hitEntities = new ListTag();
Expand All @@ -392,7 +392,7 @@ else if (lastLocation != null && lastVelocity != null) {
}
}
}
queue.addDefinition("hit_entities", hitEntities.identify());
queue.addDefinition("hit_entities", hitEntities);
if (definitions != null) {
int x = 1;
String[] definition_names = null;
Expand Down

0 comments on commit 129b8c8

Please sign in to comment.