Player affects spawning API

This commit is contained in:
Jedediah Smith
2016-03-01 14:47:52 -06:00
parent f41436f787
commit 840b8a7bfa
9 changed files with 111 additions and 26 deletions

View File

@ -213,7 +213,8 @@
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
} else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
Player entityhuman = this.level().getNearestPlayer(this, -1.0D);
- Player entityhuman = this.level().getNearestPlayer(this, -1.0D);
+ Player entityhuman = this.level().findNearbyPlayer(this, -1.0D, EntitySelector.PLAYER_AFFECTS_SPAWNING); // Paper - Affects Spawning API
if (entityhuman != null) {
- double d0 = entityhuman.distanceToSqr((Entity) this);