#1045: Revert changes to persistence required checks
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
@@ -14,17 +14,7 @@
|
||||
public final class SpawnerCreature {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -73,7 +80,8 @@
|
||||
if (entity instanceof EntityInsentient) {
|
||||
EntityInsentient entityinsentient = (EntityInsentient) entity;
|
||||
|
||||
- if (entityinsentient.isPersistenceRequired() || entityinsentient.requiresCustomPersistence()) {
|
||||
+ // CraftBukkit - Split out persistent check, don't apply it to special persistent mobs
|
||||
+ if (entityinsentient.removeWhenFarAway(0) && entityinsentient.isPersistenceRequired()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -111,10 +119,25 @@
|
||||
@@ -111,10 +118,25 @@
|
||||
EnumCreatureType[] aenumcreaturetype = SpawnerCreature.SPAWNING_CATEGORIES;
|
||||
int i = aenumcreaturetype.length;
|
||||
|
||||
@@ -51,7 +41,7 @@
|
||||
Objects.requireNonNull(spawnercreature_d);
|
||||
SpawnerCreature.c spawnercreature_c = spawnercreature_d::canSpawn;
|
||||
|
||||
@@ -199,10 +222,14 @@
|
||||
@@ -199,10 +221,14 @@
|
||||
entityinsentient.moveTo(d0, (double) i, d1, worldserver.random.nextFloat() * 360.0F, 0.0F);
|
||||
if (isValidPositionForMob(worldserver, entityinsentient, d2)) {
|
||||
groupdataentity = entityinsentient.finalizeSpawn(worldserver, worldserver.getCurrentDifficultyAt(entityinsentient.blockPosition()), EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null);
|
||||
@@ -70,7 +60,7 @@
|
||||
if (j >= entityinsentient.getMaxSpawnClusterSize()) {
|
||||
return;
|
||||
}
|
||||
@@ -383,7 +410,7 @@
|
||||
@@ -383,7 +409,7 @@
|
||||
|
||||
if (entityinsentient.checkSpawnRules(worldaccess, EnumMobSpawn.CHUNK_GENERATION) && entityinsentient.checkSpawnObstruction(worldaccess)) {
|
||||
groupdataentity = entityinsentient.finalizeSpawn(worldaccess, worldaccess.getCurrentDifficultyAt(entityinsentient.blockPosition()), EnumMobSpawn.CHUNK_GENERATION, groupdataentity, (NBTTagCompound) null);
|
||||
@@ -79,7 +69,7 @@
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
@@ -504,8 +531,10 @@
|
||||
@@ -504,8 +530,10 @@
|
||||
return this.unmodifiableMobCategoryCounts;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user