mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-29 03:55:51 +00:00
chore: format Minecraft.World
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
|
||||
class Level;
|
||||
|
||||
class BasicTree : public Feature
|
||||
{
|
||||
class BasicTree : public Feature {
|
||||
private:
|
||||
// The axisConversionArray, when given a primary index, allows easy
|
||||
// access to the indices of the other two axies. Access the data at the
|
||||
@@ -26,10 +25,10 @@ private:
|
||||
static uint8_t axisConversionArray[];
|
||||
|
||||
// Set up the pseudorandom number generator
|
||||
Random *rnd;
|
||||
Random* rnd;
|
||||
|
||||
// Make fields to hold the level data and the random seed
|
||||
Level *thisLevel;
|
||||
Level* thisLevel;
|
||||
|
||||
// Field to hold the tree origin, x y and z.
|
||||
int origin[3];
|
||||
@@ -45,26 +44,29 @@ private:
|
||||
int trunkWidth;
|
||||
int heightVariance;
|
||||
int foliageHeight;
|
||||
// The foliage coordinates are a list of [x,y,z,y of branch base] values for each cluster
|
||||
int **foliageCoords;
|
||||
int foliageCoordsLength;
|
||||
void prepare();
|
||||
void crossection(int x, int y, int z, float radius, uint8_t direction, int material);
|
||||
float treeShape(int y);
|
||||
float foliageShape(int y);
|
||||
void foliageCluster(int x, int y, int z);
|
||||
void limb(int *start, int *end, int material);
|
||||
void makeFoliage();
|
||||
bool trimBranches(int localY);
|
||||
void makeTrunk();
|
||||
void makeBranches();
|
||||
int checkLine(int *start, int *end);
|
||||
bool checkLocation();
|
||||
// The foliage coordinates are a list of [x,y,z,y of branch base] values for
|
||||
// each cluster
|
||||
int** foliageCoords;
|
||||
int foliageCoordsLength;
|
||||
void prepare();
|
||||
void crossection(int x, int y, int z, float radius, uint8_t direction,
|
||||
int material);
|
||||
float treeShape(int y);
|
||||
float foliageShape(int y);
|
||||
void foliageCluster(int x, int y, int z);
|
||||
void limb(int* start, int* end, int material);
|
||||
void makeFoliage();
|
||||
bool trimBranches(int localY);
|
||||
void makeTrunk();
|
||||
void makeBranches();
|
||||
int checkLine(int* start, int* end);
|
||||
bool checkLocation();
|
||||
|
||||
public:
|
||||
BasicTree(bool doUpdate);
|
||||
virtual ~BasicTree();
|
||||
BasicTree(bool doUpdate);
|
||||
virtual ~BasicTree();
|
||||
|
||||
virtual void init(double heightInit, double widthInit, double foliageDensityInit);
|
||||
virtual bool place(Level *level, Random *random, int x, int y, int z);
|
||||
virtual void init(double heightInit, double widthInit,
|
||||
double foliageDensityInit);
|
||||
virtual bool place(Level* level, Random* random, int x, int y, int z);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user