This commit is contained in:
gnembon committed 2024-01-24 23:52:01 +01:00
1 parent ea3f51e6fb
commit f316ffa3e2
4 files changed
+8 -22

No files matched your search

@@ -176,9 +176,7 @@ public class PerimeterDiagnostics
}
}
SpawnPlacements.Type spt = SpawnPlacements.getPlacementType(sle.type);
if (NaturalSpawner.isSpawnPositionOk(spt, worldServer, pos, sle.type))
if (SpawnPlacements.isSpawnPositionOk(sle.type, worldServer, pos))
{
el.moveTo(pos.getX() + 0.5F, pos.getY(), pos.getZ()+0.5F, 0.0F, 0.0F);
return el.checkSpawnObstruction(worldServer) && el.checkSpawnRules(worldServer, MobSpawnType.NATURAL) &&
@@ -414,7 +414,7 @@ public class SpawnReporter
{
if (SpawnPlacements.getPlacementType(spawnEntry.type) == null)
continue; // vanilla bug
boolean canSpawn = NaturalSpawner.isSpawnPositionOk(SpawnPlacements.getPlacementType(spawnEntry.type), worldIn, pos, spawnEntry.type);
boolean canSpawn = SpawnPlacements.isSpawnPositionOk(spawnEntry.type, worldIn, pos);
int willSpawn = -1;
boolean fits = false;
@@ -444,7 +444,7 @@ public class SpawnReporter
{
if (
SpawnPlacements.checkSpawnRules(etype,worldIn, MobSpawnType.NATURAL, pos, worldIn.random) &&
NaturalSpawner.isSpawnPositionOk(SpawnPlacements.getPlacementType(etype), worldIn, pos, etype) &&
SpawnPlacements.isSpawnPositionOk(etype, worldIn, pos) &&
mob.checkSpawnRules(worldIn, MobSpawnType.NATURAL)
// && mob.canSpawn(worldIn) // entity collisions // mostly - except ocelots
)