This commit is contained in:
gnembon committed 2020-09-07 15:16:15 -03:00
1 parent a9572236dd
commit 7daac70f93
7 files changed
+27 -25

No files matched your search

@@ -183,7 +183,7 @@ public class PerimeterDiagnostics
el.refreshPositionAndAngles((float)pos.getX() + 0.5F, (float)pos.getY(), (float)pos.getZ()+0.5F, 0.0F, 0.0F);
return el.canSpawn(worldServer) && el.canSpawn(worldServer, SpawnReason.NATURAL) &&
SpawnRestriction.canSpawn(el.getType(),(ServerWorld)el.getEntityWorld(), SpawnReason.NATURAL, el.getBlockPos(), el.getEntityWorld().random) &&
worldServer.doesNotCollide(el); // check collision rules once they stop fiddling with them after 1.14.1
worldServer.isSpaceEmpty(el); // check collision rules once they stop fiddling with them after 1.14.1
}
return false;
}
@@ -467,7 +467,7 @@ public class SpawnReporter
float f = (float)x + 0.5F;
float f1 = (float)z + 0.5F;
mob.refreshPositionAndAngles((double)f, (double)y, (double)f1, worldIn.random.nextFloat() * 360.0F, 0.0F);
fits1 = worldIn.doesNotCollide(mob);
fits1 = worldIn.isSpaceEmpty(mob);
EntityType etype = mob.getType();
for (int i = 0; i < 20; ++i)
@@ -483,7 +483,7 @@ public class SpawnReporter
}
mob.initialize(worldIn, worldIn.getLocalDifficulty(mob.getBlockPos()), SpawnReason.NATURAL, null, null);
// the code invokes onInitialSpawn after getCanSpawHere
fits = fits1 && worldIn.doesNotCollide(mob);
fits = fits1 && worldIn.isSpaceEmpty(mob);
if (fits)
{
fits_true = true;