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:
Shredder
2026-04-25 04:47:07 +05:00
parent d6a3e477c1
commit 31d80aedf8
23 changed files with 864 additions and 357 deletions

View File

@@ -1,8 +1,12 @@
#include "TallGrass.h"
#include "../FoliageColor.h"
#include "../GrassColor.h"
#include "../../entity/player/Player.h"
#include "../../item/Item.h"
#include "../../item/ShearsItem.h"
#include "../Level.h"
#include "../LevelSource.h"
#include "../biome/BiomeSource.h"
TallGrass::TallGrass( int id, int tex ) : super(id, tex, Material::replaceable_plant) {
float ss = 0.4f;
@@ -17,9 +21,14 @@ int TallGrass::getTexture( int face, int data ) {
}
int TallGrass::getColor() {
/*double temp = 0.5;
double rain = 1.0;
return GrassColor.get(temp, rain);*/
//double temp = 0.5;
//double rain = 1.0;
// converted to float for consistency - shredder
float temp = 0.5;
float rain = 1.0;
if (GrassColor::useTint){
return GrassColor::get(temp, rain);
}
return 0x339933;
}
@@ -31,7 +40,15 @@ int TallGrass::getColor( int auxData ) {
int TallGrass::getColor( LevelSource* level, int x, int y, int z ) {
int d = level->getData(x, y, z);
if (d == DEAD_SHRUB) return 0xffffff;
float temp = level->getBiomeSource()->temperatures[0]; // shredder added
float rain = level->getBiomeSource()->downfalls[0]; // shredder added
if (GrassColor::useTint){
return GrassColor::get(temp, rain);
}
// @TODO port this function from beta 1.6.6 probably, for now im using biomesource to tint it directly above - shredder
//if (GrassColor::useTint){
//return level->getBiome(x, z)->getGrassColor();
//}
return 0x339933;//level->getBiome(x, z)->getGrassColor();
}