mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-26 05:50:08 +00:00
Fix tree spawning issue.
This commit is contained in:
1 parent
996c153b9a
commit
c38939f334
2 files changed
+7
-3
No files matched your search
@@ -87,7 +87,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.polydev</groupId>
|
<groupId>org.polydev</groupId>
|
||||||
<artifactId>gaea</artifactId>
|
<artifactId>gaea</artifactId>
|
||||||
<version>1.10.82</version>
|
<version>1.10.83</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
|
|||||||
@@ -33,8 +33,12 @@ public class TreePopulator extends GaeaBlockPopulator {
|
|||||||
int att = 0;
|
int att = 0;
|
||||||
for(int i = 0; i < b.getDecorator().getTreeDensity() && att < max; ) {
|
for(int i = 0; i < b.getDecorator().getTreeDensity() && att < max; ) {
|
||||||
att++;
|
att++;
|
||||||
int y = WorldUtil.getHighestValidSpawnAt(chunk, x, z);
|
int y = 255;
|
||||||
if(y <= 0) continue;
|
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);
|
origin = chunk.getBlock(x, y, z).getLocation().add(0, 1, 0);
|
||||||
b = grid.getBiome(origin, GenerationPhase.POPULATE);
|
b = grid.getBiome(origin, GenerationPhase.POPULATE);
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in new issue
Block a user