mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-18 10:32:30 +00:00
Fix tree spawning issue.
This commit is contained in:
parent
996c153b9a
commit
c38939f334
2
pom.xml
2
pom.xml
@ -87,7 +87,7 @@
|
||||
<dependency>
|
||||
<groupId>org.polydev</groupId>
|
||||
<artifactId>gaea</artifactId>
|
||||
<version>1.10.82</version>
|
||||
<version>1.10.83</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
|
@ -33,8 +33,12 @@ public class TreePopulator extends GaeaBlockPopulator {
|
||||
int att = 0;
|
||||
for(int i = 0; i < b.getDecorator().getTreeDensity() && att < max; ) {
|
||||
att++;
|
||||
int y = WorldUtil.getHighestValidSpawnAt(chunk, x, z);
|
||||
if(y <= 0) continue;
|
||||
int y = 255;
|
||||
while(y > 1) {
|
||||
if(chunk.getBlock(x, y, z).getType().isAir() && chunk.getBlock(x, y-1, z).getType().isSolid()) break;
|
||||
y--;
|
||||
}
|
||||
if(y == 0) continue;
|
||||
origin = chunk.getBlock(x, y, z).getLocation().add(0, 1, 0);
|
||||
b = grid.getBiome(origin, GenerationPhase.POPULATE);
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user