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

@@ -27,31 +27,28 @@ LightningBolt::LightningBolt(Level *level, double x, double y, double z) :
flashes = 1;
// 4J - added clientside check
if( !level->isClientSide )
if( !level->isClientSide && level->getGameRules()->getBoolean(GameRules::RULE_DOFIRETICK)&&level->difficulty >= 2 && level->hasChunksAt( Mth::floor(x), Mth::floor(y), Mth::floor(z), 10))
{
if (level->difficulty >= 2 && level->hasChunksAt( Mth::floor(x), Mth::floor(y), Mth::floor(z), 10))
{
int xt = Mth::floor(x);
int yt = Mth::floor(y);
int zt = Mth::floor(z);
// 4J added - don't go setting tiles if we aren't tracking them for network synchronisation
if( MinecraftServer::getInstance()->getPlayers()->isTrackingTile(xt, yt, zt, level->dimension->id) )
{
int xt = Mth::floor(x);
int yt = Mth::floor(y);
int zt = Mth::floor(z);
// 4J added - don't go setting tiles if we aren't tracking them for network synchronisation
if( MinecraftServer::getInstance()->getPlayers()->isTrackingTile(xt, yt, zt, level->dimension->id) )
{
if (level->getTile(xt, yt, zt) == 0 && Tile::fire->mayPlace(level, xt, yt, zt)) level->setTile(xt, yt, zt, Tile::fire_Id);
}
if (level->getTile(xt, yt, zt) == 0 && Tile::fire->mayPlace(level, xt, yt, zt)) level->setTileAndUpdate(xt, yt, zt, Tile::fire_Id);
}
}
for (int i = 0; i < 4; i++)
for (int i = 0; i < 4; i++)
{
int xt = Mth::floor(x) + random->nextInt(3) - 1;
int yt = Mth::floor(y) + random->nextInt(3) - 1;
int zt = Mth::floor(z) + random->nextInt(3) - 1;
// 4J added - don't go setting tiles if we aren't tracking them for network synchronisation
if( MinecraftServer::getInstance()->getPlayers()->isTrackingTile(xt, yt, zt, level->dimension->id) )
{
int xt = Mth::floor(x) + random->nextInt(3) - 1;
int yt = Mth::floor(y) + random->nextInt(3) - 1;
int zt = Mth::floor(z) + random->nextInt(3) - 1;
// 4J added - don't go setting tiles if we aren't tracking them for network synchronisation
if( MinecraftServer::getInstance()->getPlayers()->isTrackingTile(xt, yt, zt, level->dimension->id) )
{
if (level->getTile(xt, yt, zt) == 0 && Tile::fire->mayPlace(level, xt, yt, zt)) level->setTile(xt, yt, zt, Tile::fire_Id);
}
if (level->getTile(xt, yt, zt) == 0 && Tile::fire->mayPlace(level, xt, yt, zt)) level->setTileAndUpdate(xt, yt, zt, Tile::fire_Id);
}
}
}
@@ -79,21 +76,18 @@ void LightningBolt::tick()
{
flashes--;
life = 1;
// 4J - added clientside check
if( !level->isClientSide )
{
seed = random->nextLong();
if (level->hasChunksAt( (int) floor(x), (int) floor(y), (int) floor(z), 10))
{
int xt = (int) floor(x);
int yt = (int) floor(y);
int zt = (int) floor(z);
// 4J added - don't go setting tiles if we aren't tracking them for network synchronisation
if( MinecraftServer::getInstance()->getPlayers()->isTrackingTile(xt, yt, zt, level->dimension->id) )
{
if (level->getTile(xt, yt, zt) == 0 && Tile::fire->mayPlace(level, xt, yt, zt)) level->setTile(xt, yt, zt, Tile::fire_Id);
}
seed = random->nextLong();
if (!level->isClientSide && level->getGameRules()->getBoolean(GameRules::RULE_DOFIRETICK) && level->hasChunksAt( (int) floor(x), (int) floor(y), (int) floor(z), 10))
{
int xt = (int) floor(x);
int yt = (int) floor(y);
int zt = (int) floor(z);
// 4J added - don't go setting tiles if we aren't tracking them for network synchronisation
if( MinecraftServer::getInstance()->getPlayers()->isTrackingTile(xt, yt, zt, level->dimension->id) )
{
if (level->getTile(xt, yt, zt) == 0 && Tile::fire->mayPlace(level, xt, yt, zt)) level->setTileAndUpdate(xt, yt, zt, Tile::fire_Id);
}
}
}
@@ -101,10 +95,13 @@ void LightningBolt::tick()
if (life >= 0)
{
double r = 3;
// 4J - added clientside check
if( !level->isClientSide )
if (level->isClientSide)
{
level->skyFlashTime = 2;
}
else
{
double r = 3;
vector<shared_ptr<Entity> > *entities = level->getEntities(shared_from_this(), AABB::newTemp(x - r, y - r, z - r, x + r, y + 6 + r, z + r));
AUTO_VAR(itEnd, entities->end());
for (AUTO_VAR(it, entities->begin()); it != itEnd; it++)
@@ -113,8 +110,6 @@ void LightningBolt::tick()
e->thunderHit(this);
}
}
level->lightningBoltTime = 2;
}
}