A bit big of a commit but

Added 3 Fog Choices (Pocket) (Java) (Unknown that was unused)

Restored Java Beta Sky Color code that was unused that depends on biome temperature (choosable using Java fog)

Tile Shadows and Entity Shadows that appear beneath them have been restored and fixed from the unused code, toggleable by turning fancy graphics on or off

Entities will now render flames on themselves when on fire, including the player

Added option to use Java Style Item Count text and position in tweaks

- fileshredder
This commit is contained in:
Shredder
2026-04-06 01:52:27 +05:00
parent 378dfe8e22
commit 055f00be49
26 changed files with 1574 additions and 1300 deletions

View File

@@ -245,6 +245,7 @@ void Inventory::setupDefault() {
addItem(new ItemInstance(Item::seeds_melon));
addItem(new ItemInstance(Item::dye_powder, 1, DyePowderItem::WHITE));
addItem(new ItemInstance(Item::hoe_iron));
addItem(new ItemInstance(Item::flintAndSteel));
#ifdef RPI
Sel[0] = addItem(new ItemInstance(Item::sword_iron));
#else

File diff suppressed because it is too large Load Diff

View File

@@ -8,6 +8,8 @@
#include "../../entity/MobCategory.h"
#include "../../level/tile/TallGrass.h"
#include "../../../util/Color.h"
Biome* Biome::rainForest = NULL;
Biome* Biome::swampland = NULL;
Biome* Biome::seasonalForest = NULL;
@@ -208,11 +210,11 @@ float Biome::adjustDepth( float depth )
int Biome::getSkyColor( float temp )
{
// temp /= 3.f;
// if (temp < -1) temp = -1;
// if (temp > 1) temp = 1;
return 0x80808080;
//return Color.getHSBColor(224 / 360.0f - temp * 0.05f, 0.50f + temp * 0.1f, 1.0f).getRGB();
temp /= 3.f;
if (temp < -1) temp = -1;
if (temp > 1) temp = 1;
// return 0x80808080;This is the vanilla way, add it as OPTION_SKY or leave it like this bcus this function literally never gets used anyways if level has vanilla sky color - shredder
return Color::getHSBColor(224 / 360.0f - temp * 0.05f, 0.50f + temp * 0.1f, 1.0f).getRGB();
}
Biome::MobList& Biome::getMobs(const MobCategory& category)

View File

@@ -262,14 +262,14 @@ void LevelChunk::recalcHeight(int x, int yStart, int z) {
/*public*/
void LevelChunk::skyBrightnessChanged() {
// int x0 = xt;
// int y0 = this->minHeight - 16;
// int z0 = zt;
// int x1 = xt + 16;
// int y1 = Level::DEPTH - 1;
// int z1 = zt + 16;
int x0 = xt;
int y0 = this->minHeight - 16;
int z0 = zt;
int x1 = xt + 16;
int y1 = Level::DEPTH - 1;
int z1 = zt + 16;
//level->setTilesDirty(x0, y0, z0, x1, y1, z1);
level->setTilesDirty(x0, y0, z0, x1, y1, z1);
}
/*public*/

View File

@@ -15,7 +15,8 @@ Dimension::Dimension()
ultraWarm(false),
hasCeiling(false),
biomeSource(NULL),
id(0)
id(0),
fogColor(0x80daff)
{
}
@@ -93,6 +94,18 @@ float* Dimension::getSunriseColor( float td, float a )
Vec3 Dimension::getFogColor( float td, float a )
{
if (FogType == 1)
{
fogColor = 0xc0d8ff; // 1 returns java beta styled fog color.
}
else if (FogType == 2)
{
fogColor = 0x406fe5; // 2 returns some type of unused fog color IDK what this one was used for possibly early pe??
}
else // otherwise as default we return the mcpe fog color
{
fogColor = 0x80daff;
}
float br = Mth::cos(td * Mth::PI * 2) * 2 + 0.5f;
if (br < 0.0f) br = 0.0f;
if (br > 1.0f) br = 1.0f;
@@ -104,7 +117,8 @@ Vec3 Dimension::getFogColor( float td, float a )
g *= br * 0.94f + 0.06f;
b *= br * 0.91f + 0.09f;
return Vec3(r, g, b);
//return Vec3(0.752941f, 0.847059f, 1);
//
}
bool Dimension::mayRespawn()

View File

@@ -49,8 +49,11 @@ public:
bool hasCeiling;
float brightnessRamp[16];//Level::MAX_BRIGHTNESS + 1];
int id;
// shredder added
int FogType; // lets us choose between what fog we want ig
protected:
static const long fogColor = 0x80daff;//0x406fe5;//0xc0d8ff;
long fogColor; //= 0x80daff;//0x406fe5;//0xc0d8ff;
float sunriseCol[4];
};

View File

@@ -9,6 +9,7 @@
class NormalDayCycleDimension: public Dimension {
public:
float getTimeOfDay(long time, float a) {
int dayStep = (int) (time % Level::TICKS_PER_DAY);
float td = (dayStep + a) / Level::TICKS_PER_DAY - 0.25f;
@@ -20,6 +21,18 @@ public:
}
Vec3 getFogColor( float td, float a ) {
if (FogType == 1)
{
fogColor = 0xc0d8ff; // 1 returns java beta styled fog color.
}
else if (FogType == 2)
{
fogColor = 0x406fe5; // 2 returns some type of unused fog color IDK what this one was used for possibly early pe??
}
else // otherwise as default we return the mcpe fog color
{
fogColor = 0x80daff;
}
float br = cos(td * Mth::PI * 2) * 2 + 0.5f;
if (br < 0) br = 0;
if (br > 1.f) br = 1.f;
@@ -35,7 +48,7 @@ public:
return Vec3(r, g, b);
}
};
#endif /*NET_MINECRAFT_WORLD_LEVEL_DIMENSION__NormalDayCycleDimension_H__*/