mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-18 10:32:30 +00:00
Do extensive biome check for structures.
This commit is contained in:
parent
114a9302bc
commit
ed77802ffd
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user