-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,8 +75,8 @@ public CommandResult execute(@Nonnull CommandSource commandSource, @Nonnull Comm | |
for (int i = 0; i < 10; i++) { | ||
location.getExtent().createEntity(EntityTypes.BAT, location.getPosition()).ifPresent(bat -> { | ||
bats.add(bat); | ||
location.getExtent().spawnEntity(bat, Cause.of(bat)); // TODO actual causes once SpongeDocs match SpongeReality | ||
bat.offer(Keys.INVULNERABILITY, LIFE_TICKS); | ||
location.getExtent().spawnEntity(bat, Cause.builder().owner(this.plugin).build()); // TODO Am I doing this right? | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
TheMolkaPL
|
||
bat.offer(Keys.INVULNERABILITY_TICKS, LIFE_TICKS); | ||
}); | ||
} | ||
// TODO remove on shutdown too! | ||
|
You'll need a 'SpawnCause' as the root of the cause, but yes otherwise you are doing it right.