mirror of
https://github.com/celisej567/mcpe.git
synced 2026-01-04 14:09:47 +03:00
88 lines
1.8 KiB
C++
88 lines
1.8 KiB
C++
/********************************************************************
|
|
Minecraft: Pocket Edition - Decompilation Project
|
|
Copyright (C) 2023 iProgramInCpp
|
|
|
|
The following code is licensed under the BSD 1 clause license.
|
|
SPDX-License-Identifier: BSD-1-Clause
|
|
********************************************************************/
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include "client/common/PerlinNoise.hpp"
|
|
#include "client/common/Utils.hpp"
|
|
#include "world/level/levelgen/feature/Feature.hpp"
|
|
|
|
class Biome
|
|
{
|
|
public: // Static Functions
|
|
static Biome* getBiome(float hum, float temp);
|
|
static void initBiomes();
|
|
|
|
public: // Virtual functions
|
|
virtual float adjustDepth(float depth);
|
|
virtual float adjustScale(float scale);
|
|
virtual int getSkyColor(float x);
|
|
virtual Feature* getTreeFeature(Random*);
|
|
|
|
public: // Instance Functions
|
|
Biome();
|
|
virtual ~Biome();
|
|
Biome* setColor(int color);
|
|
Biome* setLeafColor(int color);
|
|
Biome* setName(const std::string& name);
|
|
Biome* setSnowCovered();
|
|
|
|
public: // Static Variables
|
|
static Biome
|
|
* rainForest,
|
|
* swampland,
|
|
* seasonalForest,
|
|
* forest,
|
|
* savanna,
|
|
* shrubland,
|
|
* taiga,
|
|
* desert,
|
|
* plains,
|
|
* iceDesert,
|
|
* tundra;
|
|
static Biome* map[4096];
|
|
|
|
private: // Private Functions
|
|
static Biome* _getBiome(float hum, float temp);
|
|
static void recalc();
|
|
|
|
public: // Instance Variables
|
|
std::string m_name = "";
|
|
int m_Color = 0;
|
|
TileID field_20 = 0;
|
|
TileID field_21 = 0;
|
|
int m_LeafColor = 0;
|
|
};
|
|
|
|
class RainforestBiome : public Biome
|
|
{
|
|
public:
|
|
Feature* getTreeFeature(Random*) override;
|
|
};
|
|
|
|
class SwampBiome : public Biome
|
|
{
|
|
};
|
|
|
|
class ForestBiome : public Biome
|
|
{
|
|
public:
|
|
Feature* getTreeFeature(Random*) override;
|
|
};
|
|
|
|
class TaigaBiome : public Biome
|
|
{
|
|
public:
|
|
Feature* getTreeFeature(Random*) override;
|
|
};
|
|
|
|
class FlatBiome : public Biome
|
|
{
|
|
};
|