Skip to content

Commit

Permalink
make sure to not remove spectator from the world
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheaterpaul committed Oct 12, 2024
1 parent f50ecba commit 1bf26de
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ private void spawnCaptureEntity(@Nullable IFaction<?> faction) {
if (entity instanceof VampireBaseEntity vampire) {
vampire.setSpawnRestriction(VampireBaseEntity.SpawnRestriction.SIMPLE);
}
List<? extends Player> players = this.level.players();
List<? extends Player> players = new ArrayList<>(this.level.players());
players.removeIf(Player::isSpectator);
if (entity != null && !UtilLib.spawnEntityInWorld((ServerLevel) this.level, this.getVillageAreaReduced(), entity, 50, players, MobSpawnType.EVENT)) {
entity.discard();
Expand Down

0 comments on commit 1bf26de

Please sign in to comment.