feat: extra swarm spawn check
This commit is contained in:
@@ -40,6 +40,10 @@ data class SwarmProjectionEffect(
|
||||
level.random.nextInt(area.minZ(), area.maxZ()),
|
||||
)
|
||||
spawnPos = spawnPos.atY(level.getHeight(Heightmap.Types.WORLD_SURFACE, spawnPos.x, spawnPos.z))
|
||||
if (level.getBlockState(spawnPos.below()).isAir)
|
||||
return
|
||||
if (!level.getBlockState(spawnPos).isAir)
|
||||
return
|
||||
ProjectedPersonEntity.entity.get().spawn(level, spawnPos, MobSpawnType.TRIGGERED)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user