feat: TU19 (Dec 2014) Features & Content (#155)

* try to resolve merge conflict

* feat: TU19 (Dec 2014) Features & Content (#32)

* December 2014 files

* Working release build

* Fix compilation issues

* Add sound to Windows64Media

* Add DLC content and force Tutorial DLC

* Revert "Add DLC content and force Tutorial DLC"

This reverts commit 97a4399472.

* Disable broken light packing

* Disable breakpoint during DLC texture map load

Allows DLC loading but the DLC textures are still broken

* Fix post build not working

* ...

* fix vs2022 build

* fix cmake build

---------

Co-authored-by: Loki <lokirautio@gmail.com>
This commit is contained in:
daoge
2026-03-03 03:04:10 +08:00
committed by GitHub
parent 84c31a2331
commit b3feddfef3
2069 changed files with 264842 additions and 139522 deletions

View File

@@ -61,30 +61,30 @@ void Biome::staticCtor()
Biome::hell = (new HellBiome(8))->setColor(0xff0000)->setName(L"Hell")->setNoRain()->setTemperatureAndDownfall(2, 0)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_Hell, eMinecraftColour_Foliage_Hell, eMinecraftColour_Water_Hell,eMinecraftColour_Sky_Hell);
Biome::sky = (new TheEndBiome(9))->setColor(0x8080ff)->setName(L"Sky")->setNoRain()->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_Sky, eMinecraftColour_Foliage_Sky, eMinecraftColour_Water_Sky,eMinecraftColour_Sky_Sky);
Biome::frozenOcean = (new OceanBiome(10))->setColor(0x9090a0)->setName(L"FrozenOcean")->setSnowCovered()->setDepthAndScale(-1, 0.5f)->setTemperatureAndDownfall(0, 0.5f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_FrozenOcean, eMinecraftColour_Foliage_FrozenOcean, eMinecraftColour_Water_FrozenOcean,eMinecraftColour_Sky_FrozenOcean);
Biome::frozenRiver = (new RiverBiome(11))->setColor(0xa0a0ff)->setName(L"FrozenRiver")->setSnowCovered()->setDepthAndScale(-0.5f, 0)->setTemperatureAndDownfall(0, 0.5f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_FrozenRiver, eMinecraftColour_Foliage_FrozenRiver, eMinecraftColour_Water_FrozenRiver,eMinecraftColour_Sky_FrozenRiver);
Biome::iceFlats = (new IceBiome(12))->setColor(0xffffff)->setName(L"Ice Plains")->setSnowCovered()->setTemperatureAndDownfall(0, 0.5f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_IcePlains, eMinecraftColour_Foliage_IcePlains, eMinecraftColour_Water_IcePlains,eMinecraftColour_Sky_IcePlains);
Biome::iceMountains = (new IceBiome(13))->setColor(0xa0a0a0)->setName(L"Ice Mountains")->setSnowCovered()->setDepthAndScale(0.3f, 1.3f)->setTemperatureAndDownfall(0, 0.5f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_IceMountains, eMinecraftColour_Foliage_IceMountains, eMinecraftColour_Water_IceMountains,eMinecraftColour_Sky_IceMountains);
Biome::mushroomIsland = (new MushroomIslandBiome(14))->setColor(0xff00ff)->setName(L"MushroomIsland")->setTemperatureAndDownfall(0.9f, 1.0f)->setDepthAndScale(0.2f, 1.0f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_MushroomIsland, eMinecraftColour_Foliage_MushroomIsland, eMinecraftColour_Water_MushroomIsland,eMinecraftColour_Sky_MushroomIsland);
Biome::mushroomIslandShore = (new MushroomIslandBiome(15))->setColor(0xa000ff)->setName(L"MushroomIslandShore")->setTemperatureAndDownfall(0.9f, 1.0f)->setDepthAndScale(-1, 0.1f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_MushroomIslandShore, eMinecraftColour_Foliage_MushroomIslandShore, eMinecraftColour_Water_MushroomIslandShore,eMinecraftColour_Sky_MushroomIslandShore);
Biome::beaches = (new BeachBiome(16))->setColor(0xfade55)->setName(L"Beach")->setTemperatureAndDownfall(0.8f, 0.4f)->setDepthAndScale(0.0f, 0.1f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_Beach, eMinecraftColour_Foliage_Beach, eMinecraftColour_Water_Beach,eMinecraftColour_Sky_Beach);
Biome::desertHills = (new DesertBiome(17))->setColor(0xd25f12)->setName(L"DesertHills")->setNoRain()->setTemperatureAndDownfall(2, 0)->setDepthAndScale(0.3f, 0.8f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_DesertHills, eMinecraftColour_Foliage_DesertHills, eMinecraftColour_Water_DesertHills,eMinecraftColour_Sky_DesertHills);
Biome::forestHills = (new ForestBiome(18))->setColor(0x22551c)->setName(L"ForestHills")->setLeafColor(0x4EBA31)->setTemperatureAndDownfall(0.7f, 0.8f)->setDepthAndScale(0.3f, 0.7f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_ForestHills, eMinecraftColour_Foliage_ForestHills, eMinecraftColour_Water_ForestHills,eMinecraftColour_Sky_ForestHills);
Biome::taigaHills = (new TaigaBiome(19))->setColor(0x163933)->setName(L"TaigaHills")->setSnowCovered()->setLeafColor(0x4EBA31)->setTemperatureAndDownfall(0.05f, 0.8f)->setDepthAndScale(0.3f, 0.8f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_TaigaHills, eMinecraftColour_Foliage_TaigaHills, eMinecraftColour_Water_TaigaHills,eMinecraftColour_Sky_TaigaHills);
Biome::smallerExtremeHills = (new ExtremeHillsBiome(20))->setColor(0x72789a)->setName(L"Extreme Hills Edge")->setDepthAndScale(0.2f, 0.8f)->setTemperatureAndDownfall(0.2f, 0.3f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_ExtremeHillsEdge, eMinecraftColour_Foliage_ExtremeHillsEdge, eMinecraftColour_Water_ExtremeHillsEdge,eMinecraftColour_Sky_ExtremeHillsEdge);
Biome::desertHills = (new DesertBiome(17))->setColor(0xd25f12)->setName(L"DesertHills")->setNoRain()->setTemperatureAndDownfall(2, 0)->setDepthAndScale(0.3f, 0.8f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_DesertHills, eMinecraftColour_Foliage_DesertHills, eMinecraftColour_Water_DesertHills,eMinecraftColour_Sky_DesertHills);
Biome::forestHills = (new ForestBiome(18))->setColor(0x22551c)->setName(L"ForestHills")->setLeafColor(0x4EBA31)->setTemperatureAndDownfall(0.7f, 0.8f)->setDepthAndScale(0.3f, 0.7f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_ForestHills, eMinecraftColour_Foliage_ForestHills, eMinecraftColour_Water_ForestHills,eMinecraftColour_Sky_ForestHills);
Biome::taigaHills = (new TaigaBiome(19))->setColor(0x163933)->setName(L"TaigaHills")->setSnowCovered()->setLeafColor(0x4EBA31)->setTemperatureAndDownfall(0.05f, 0.8f)->setDepthAndScale(0.3f, 0.8f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_TaigaHills, eMinecraftColour_Foliage_TaigaHills, eMinecraftColour_Water_TaigaHills,eMinecraftColour_Sky_TaigaHills);
Biome::smallerExtremeHills = (new ExtremeHillsBiome(20))->setColor(0x72789a)->setName(L"Extreme Hills Edge")->setDepthAndScale(0.2f, 0.8f)->setTemperatureAndDownfall(0.2f, 0.3f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_ExtremeHillsEdge, eMinecraftColour_Foliage_ExtremeHillsEdge, eMinecraftColour_Water_ExtremeHillsEdge,eMinecraftColour_Sky_ExtremeHillsEdge);
Biome::jungle = (new JungleBiome(21))->setColor(0x537b09)->setName(L"Jungle")->setLeafColor(0x537b09)->setTemperatureAndDownfall(1.2f, 0.9f)->setDepthAndScale(0.2f, 0.4f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_Jungle, eMinecraftColour_Foliage_Jungle, eMinecraftColour_Water_Jungle,eMinecraftColour_Sky_Jungle);
Biome::jungleHills = (new JungleBiome(22))->setColor(0x2c4205)->setName(L"JungleHills")->setLeafColor(0x537b09)->setTemperatureAndDownfall(1.2f, 0.9f)->setDepthAndScale(1.8f, 0.5f)->setLeafFoliageWaterSkyColor(eMinecraftColour_Grass_JungleHills, eMinecraftColour_Foliage_JungleHills, eMinecraftColour_Water_JungleHills,eMinecraftColour_Sky_JungleHills);
}
Biome::Biome(int id) : id(id)
{
// 4J Stu Default inits
color = 0;
// snowCovered = false; // 4J - this isn't set by the java game any more so removing to save confusion
// snowCovered = false; // 4J - this isn't set by the java game any more so removing to save confusion
topMaterial = (byte) Tile::grass_Id;
material = (byte) Tile::dirt_Id;
@@ -103,9 +103,9 @@ Biome::Biome(int id) : id(id)
/* 4J - removing these so that we can consistently return newly created trees via getTreeFeature, and let the calling function be resposible for deleting the returned tree
normalTree = new TreeFeature();
fancyTree = new BasicTree();
birchTree = new BirchFeature();
swampTree = new SwampTreeFeature();
fancyTree = new BasicTree();
birchTree = new BirchFeature();
swampTree = new SwampTreeFeature();
*/
biomes[id] = this;
@@ -126,6 +126,8 @@ Biome::Biome(int id) : id(id)
// wolves are added to forests and taigas
waterFriendlies.push_back(new MobSpawnerData(eTYPE_SQUID, 10, 4, 4));
ambientFriendlies.push_back(new MobSpawnerData(eTYPE_BAT, 10, 8, 8));
}
Biome::~Biome()
@@ -150,7 +152,7 @@ Biome *Biome::setLeafFoliageWaterSkyColor(eMinecraftColour grassColor, eMinecraf
Biome *Biome::setTemperatureAndDownfall(float temp, float downfall)
{
this->temperature = temp;
temperature = temp;
this->downfall = downfall;
return this;
}
@@ -164,17 +166,17 @@ Biome *Biome::setDepthAndScale(float depth, float scale)
Biome *Biome::setNoRain()
{
_hasRain = false;
return this;
_hasRain = false;
return this;
}
Feature *Biome::getTreeFeature(Random *random)
{
if (random->nextInt(10) == 0)
if (random->nextInt(10) == 0)
{
return new BasicTree(false); // 4J used to return member fancyTree, now returning newly created object so that caller can be consistently resposible for cleanup
}
return new TreeFeature(false); // 4J used to return member normalTree, now returning newly created object so that caller can be consistently resposible for cleanup
return new BasicTree(false); // 4J used to return member fancyTree, now returning newly created object so that caller can be consistently resposible for cleanup
}
return new TreeFeature(false); // 4J used to return member normalTree, now returning newly created object so that caller can be consistently resposible for cleanup
}
Feature *Biome::getGrassFeature(Random *random)
@@ -184,48 +186,49 @@ Feature *Biome::getGrassFeature(Random *random)
Biome *Biome::setSnowCovered()
{
this->snowCovered = true;
return this;
snowCovered = true;
return this;
}
Biome *Biome::setName(const wstring &name)
{
this->m_name = name;
return this;
this->m_name = name;
return this;
}
Biome *Biome::setLeafColor(int leafColor)
{
this->leafColor = leafColor;
return this;
this->leafColor = leafColor;
return this;
}
Biome *Biome::setColor(int color)
{
this->color = color;
return this;
this->color = color;
return this;
}
int Biome::getSkyColor(float temp)
{
//temp /= 3.0f;
//if (temp < -1) temp = -1;
//if (temp > 1) temp = 1;
//return Color::getHSBColor(224 / 360.0f - temp * 0.05f, 0.50f + temp * 0.1f, 1.0f).getRGB();
//temp /= 3.0f;
//if (temp < -1) temp = -1;
//if (temp > 1) temp = 1;
//return Color::getHSBColor(224 / 360.0f - temp * 0.05f, 0.50f + temp * 0.1f, 1.0f).getRGB();
// 4J Stu - Load colour from texture pack
return Minecraft::GetInstance()->getColourTable()->getColor( m_skyColor );
}
vector<Biome::MobSpawnerData *> *Biome::getMobs(MobCategory *category)
{
if (category == MobCategory::monster) return &enemies;
if (category == MobCategory::creature) return &friendlies;
if (category == MobCategory::waterCreature) return &waterFriendlies;
if (category == MobCategory::monster) return &enemies;
if (category == MobCategory::creature) return &friendlies;
if (category == MobCategory::waterCreature) return &waterFriendlies;
if (category == MobCategory::creature_chicken) return &friendlies_chicken;
if (category == MobCategory::creature_wolf) return &friendlies_wolf;
if (category == MobCategory::creature_mushroomcow) return &friendlies_mushroomcow;
return NULL;
if (category == MobCategory::ambient) return &ambientFriendlies;
return NULL;
}
bool Biome::hasSnow()
@@ -235,15 +238,15 @@ bool Biome::hasSnow()
if( getTemperature() >= 0.15f ) return false;
return true;
return true;
}
bool Biome::hasRain()
{
// 4J - snowCovered flag removed as it wasn't being set by the game anymore, replaced by call to hasSnow()
if( hasSnow() ) return false;
// if (snowCovered) return false;
return _hasRain;
// if (snowCovered) return false;
return _hasRain;
}
bool Biome::isHumid()
@@ -256,8 +259,8 @@ float Biome::getCreatureProbability()
return 0.1f;
}
int Biome::getDownfallInt()
{
int Biome::getDownfallInt()
{
return (int) (downfall * 65536);
}
@@ -285,19 +288,19 @@ void Biome::decorate(Level *level, Random *random, int xo, int zo)
int Biome::getGrassColor()
{
//double temp = Mth::clamp(getTemperature(), 0.0f, 1.0f);
//double rain = Mth::clamp(getDownfall(), 0.0f, 1.0f);
//double temp = Mth::clamp(getTemperature(), 0.0f, 1.0f);
//double rain = Mth::clamp(getDownfall(), 0.0f, 1.0f);
//return GrassColor::get(temp, rain);
//return GrassColor::get(temp, rain);
return Minecraft::GetInstance()->getColourTable()->getColor( m_grassColor );
}
int Biome::getFolageColor()
{
//double temp = Mth::clamp(getTemperature(), 0.0f, 1.0f);
//double rain = Mth::clamp(getDownfall(), 0.0f, 1.0f);
//double temp = Mth::clamp(getTemperature(), 0.0f, 1.0f);
//double rain = Mth::clamp(getDownfall(), 0.0f, 1.0f);
//return FoliageColor::get(temp, rain);
//return FoliageColor::get(temp, rain);
return Minecraft::GetInstance()->getColourTable()->getColor( m_foliageColor );
}