mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-08-29 13:20:32 +00:00
Do extensive biome check for structures.
This commit is contained in:
@@ -44,6 +44,10 @@ public class StructurePopulator extends BlockPopulator {
|
|||||||
spawn.setY(y);
|
spawn.setY(y);
|
||||||
for(StructureSpawnRequirement s : struc.getSpawns()) {
|
for(StructureSpawnRequirement s : struc.getSpawns()) {
|
||||||
if(! s.isValidSpawn(spawn)) continue main;
|
if(! s.isValidSpawn(spawn)) continue main;
|
||||||
|
if(!b.equals(TerraBiomeGrid.fromWorld(world).getBiome(spawn.clone().add(s.getX(), s.getY(), s.getZ()), GenerationPhase.POPULATE))) {
|
||||||
|
Bukkit.getLogger().info("PREVENTED invalid spawn at " + spawn);
|
||||||
|
continue structure;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
double horizontal = struc.getStructureInfo().getMaxHorizontal();
|
double horizontal = struc.getStructureInfo().getMaxHorizontal();
|
||||||
Bukkit.getLogger().info("Valid spawn at " + spawn);
|
Bukkit.getLogger().info("Valid spawn at " + spawn);
|
||||||
|
|||||||
Reference in New Issue
Block a user