forked from EXTERNAL/bareiron
fix features generating when they shouldn't
This commit is contained in:
@@ -172,9 +172,7 @@ uint8_t getHeightAt (int x, int z) {
|
|||||||
|
|
||||||
uint8_t getTerrainAtFromCache (int x, int y, int z, int rx, int rz, ChunkAnchor anchor, ChunkFeature feature, uint8_t height) {
|
uint8_t getTerrainAtFromCache (int x, int y, int z, int rx, int rz, ChunkAnchor anchor, ChunkFeature feature, uint8_t height) {
|
||||||
|
|
||||||
if (y < 64 || y < height) goto skip_feature;
|
if (y >= 64 && y >= height && feature.y != 255) switch (anchor.biome) {
|
||||||
|
|
||||||
switch (anchor.biome) {
|
|
||||||
case W_plains: { // Generate trees in the plains biome
|
case W_plains: { // Generate trees in the plains biome
|
||||||
|
|
||||||
// Don't generate trees underwater
|
// Don't generate trees underwater
|
||||||
@@ -250,7 +248,6 @@ uint8_t getTerrainAtFromCache (int x, int y, int z, int rx, int rz, ChunkAnchor
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
skip_feature:
|
|
||||||
// Handle surface-level terrain (the very topmost blocks)
|
// Handle surface-level terrain (the very topmost blocks)
|
||||||
if (height >= 63) {
|
if (height >= 63) {
|
||||||
if (y == height) {
|
if (y == height) {
|
||||||
|
Reference in New Issue
Block a user