fix: savanna biome + savanna tree
used compilation to change savanna biome generation and savanna tree teatures using abstractTreeFeature that was missing.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
#include "Feature.h"
|
||||
#include "Level.h"
|
||||
#include "Tile.h"
|
||||
|
||||
class AbstractTreeFeature : public Feature
|
||||
{
|
||||
public:
|
||||
AbstractTreeFeature(bool doUpdate) : Feature(doUpdate) {}
|
||||
virtual ~AbstractTreeFeature() {}
|
||||
|
||||
static bool isFree(Level* level, int x, int y, int z)
|
||||
{
|
||||
int tile = level->getTile(x, y, z);
|
||||
return tile == 0
|
||||
|| tile == Tile::leaves_Id
|
||||
|| tile == Tile::leaves2_Id
|
||||
|| tile == Tile::treeTrunk_Id
|
||||
|| tile == Tile::tree2Trunk_Id
|
||||
|| tile == Tile::vine_Id
|
||||
|| tile == Tile::tallgrass_Id
|
||||
|| tile == Tile::flower_Id;
|
||||
}
|
||||
|
||||
void setDirtAt(Level* level, int x, int y, int z)
|
||||
{
|
||||
if (level->getTile(x, y, z) != Tile::dirt_Id)
|
||||
{
|
||||
placeBlock(level, x, y, z, Tile::dirt_Id, 0);
|
||||
}
|
||||
}
|
||||
virtual void postPlaceTree() {}
|
||||
};
|
||||
Reference in New Issue
Block a user