oops forgot to include the other files.

This commit is contained in:
Shredder
2026-04-01 23:37:37 +05:00
parent 27f0287986
commit 84e8744387
8 changed files with 51 additions and 194 deletions

View File

@@ -2,6 +2,7 @@
#include "../levelgen/feature/TreeFeature.h"
#include "../levelgen/feature/TallgrassFeature.h"
#include "../levelgen/feature/BasicTree.h"
#include "../../entity/EntityTypes.h"
#include "../../entity/MobCategory.h"
@@ -140,7 +141,7 @@ void Biome::teardownBiomes() {
Feature* Biome::getTreeFeature( Random* random )
{
if (random->nextInt(10) == 0) {
//return /*new*/ BasicTree();
return new BasicTree(false);
}
return new TreeFeature(false);
}
@@ -148,6 +149,15 @@ Feature* Biome::getGrassFeature( Random* random ) {
return new TallgrassFeature(Tile::tallgrass->id, TallGrass::TALL_GRASS);
}
Feature* Biome::getBasicTreeFeature( Random* random )
{
if (random->nextInt(10) == 0) {
return new BasicTree(false);
}
}
Biome* Biome::getBiome( float temperature, float downfall )
{
int a = (int) (temperature * 63);

View File

@@ -71,6 +71,7 @@ public:
virtual Feature* getTreeFeature(Random* random);
virtual Feature* getGrassFeature(Random* random);
virtual Feature* getBasicTreeFeature(Random* random);
static Biome* getBiome(float temperature, float downfall);
static Biome* _getBiome(float temperature, float downfall);

View File

@@ -6,6 +6,7 @@
#include "Biome.h"
#include "../levelgen/feature/TreeFeature.h"
#include "../levelgen/feature/BirchFeature.h"
#include "../levelgen/feature/BasicTree.h"
class ForestBiome: public Biome
{
@@ -15,7 +16,7 @@ public:
return new BirchFeature();
}
if (random->nextInt(3) == 0) {
//return new BasicTree();
return new BasicTree(false);
}
return new TreeFeature(false);
}

View File

@@ -6,13 +6,14 @@
#include "Biome.h"
#include "../../../util/Random.h"
#include "../levelgen/feature/TreeFeature.h"
#include "../levelgen/feature/BasicTree.h"
class RainforestBiome: public Biome
{
public:
Feature* getTreeFeature(Random* random) {
if (random->nextInt(3) == 0) {
//return new BasicTree();
return new BasicTree(false);
}
return new TreeFeature(false);
}