Massive Java Parity Update - fileshredder
3D/Fancy Clouds have been ported over Sky Rendering is now an option between Java and PE Java Sky/Fog color option is now accurate using the original color ramp instead of PE's slightly lower one Grass Sides are now tinted, and can be toggled in settings Added stars, the sun, and the moon in the daylight cycle Sunset color has been added, appears when the sun is rising or falling, buggy on PE's sky rendering option. Fixed leaves being rendered bright green when foliage tinting was turned off. Enabled Tall Grass generation code Tall Grass is now tinted. Other compile options have to be tested
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "../../level/tile/TallGrass.h"
|
||||
|
||||
#include "../../../util/Color.h"
|
||||
#include "../GrassColor.h"
|
||||
|
||||
Biome* Biome::rainForest = NULL;
|
||||
Biome* Biome::swampland = NULL;
|
||||
@@ -217,6 +218,26 @@ int Biome::getSkyColor( float temp )
|
||||
return Color::getHSBColor(224 / 360.0f - temp * 0.05f, 0.50f + temp * 0.1f, 1.0f).getRGB();
|
||||
}
|
||||
|
||||
float Biome::getDownfall()
|
||||
{
|
||||
return downfall;
|
||||
}
|
||||
|
||||
|
||||
float Biome::getTemperature()
|
||||
{
|
||||
return temperature;
|
||||
}
|
||||
|
||||
|
||||
int Biome::getGrassColor()
|
||||
{
|
||||
float temp = Mth::clamp(getTemperature(), 0.0f, 1.0f);
|
||||
float rain = Mth::clamp(getDownfall(), 0.0f, 1.0f);
|
||||
|
||||
return GrassColor::get(temp, rain);
|
||||
}
|
||||
|
||||
Biome::MobList& Biome::getMobs(const MobCategory& category)
|
||||
{
|
||||
if (&category == &MobCategory::monster)
|
||||
|
||||
@@ -78,7 +78,13 @@ public:
|
||||
virtual float adjustScale(float scale);
|
||||
virtual float adjustDepth(float depth);
|
||||
|
||||
|
||||
|
||||
virtual int getSkyColor(float temp);
|
||||
virtual int getGrassColor();
|
||||
|
||||
virtual float getDownfall();
|
||||
virtual float getTemperature();
|
||||
|
||||
virtual MobList& getMobs(const MobCategory& category);
|
||||
virtual float getCreatureProbability();
|
||||
@@ -88,6 +94,8 @@ public:
|
||||
char topMaterial;
|
||||
char material;
|
||||
int leafColor;
|
||||
float temperature;
|
||||
float downfall;
|
||||
private:
|
||||
static Biome* map[64*64];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user