mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-03-25 08:48:12 +05:00
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:
@@ -16,12 +16,12 @@ HeavyTile::HeavyTile(int type, Material *material, bool isSolidRender) : Tile(ty
|
||||
|
||||
void HeavyTile::onPlace(Level *level, int x, int y, int z)
|
||||
{
|
||||
level->addToTickNextTick(x, y, z, id, getTickDelay());
|
||||
level->addToTickNextTick(x, y, z, id, getTickDelay(level));
|
||||
}
|
||||
|
||||
void HeavyTile::neighborChanged(Level *level, int x, int y, int z, int type)
|
||||
{
|
||||
level->addToTickNextTick(x, y, z, id, getTickDelay());
|
||||
level->addToTickNextTick(x, y, z, id, getTickDelay(level));
|
||||
}
|
||||
|
||||
void HeavyTile::tick(Level *level, int x, int y, int z, Random *random)
|
||||
@@ -34,56 +34,57 @@ void HeavyTile::tick(Level *level, int x, int y, int z, Random *random)
|
||||
|
||||
void HeavyTile::checkSlide(Level *level, int x, int y, int z)
|
||||
{
|
||||
int x2 = x;
|
||||
int y2 = y;
|
||||
int z2 = z;
|
||||
if (isFree(level, x2, y2 - 1, z2) && y2 >= 0)
|
||||
int x2 = x;
|
||||
int y2 = y;
|
||||
int z2 = z;
|
||||
if (isFree(level, x2, y2 - 1, z2) && y2 >= 0)
|
||||
{
|
||||
int r = 32;
|
||||
int r = 32;
|
||||
|
||||
if (instaFall || !level->hasChunksAt(x - r, y - r, z - r, x + r, y + r, z + r) )
|
||||
{
|
||||
level->setTile(x, y, z, 0);
|
||||
while (isFree(level, x, y - 1, z) && y > 0)
|
||||
y--;
|
||||
if (y > 0) {
|
||||
level->setTile(x, y, z, id);
|
||||
}
|
||||
}
|
||||
level->removeTile(x, y, z);
|
||||
while (isFree(level, x, y - 1, z) && y > 0)
|
||||
y--;
|
||||
if (y > 0)
|
||||
{
|
||||
level->setTileAndUpdate(x, y, z, id);
|
||||
}
|
||||
}
|
||||
else if (!level->isClientSide)
|
||||
{
|
||||
// 4J added - don't do anything just now if we can't create any new falling tiles
|
||||
if( !level->newFallingTileAllowed() )
|
||||
{
|
||||
level->addToTickNextTick(x, y, z, id, getTickDelay());
|
||||
level->addToTickNextTick(x, y, z, id, getTickDelay(level));
|
||||
return;
|
||||
}
|
||||
|
||||
shared_ptr<FallingTile> e = shared_ptr<FallingTile>( new FallingTile(level, x + 0.5f, y + 0.5f, z + 0.5f, id, level->getData(x, y, z)) );
|
||||
shared_ptr<FallingTile> e = shared_ptr<FallingTile>( new FallingTile(level, x + 0.5f, y + 0.5f, z + 0.5f, id, level->getData(x, y, z)) );
|
||||
falling(e);
|
||||
level->addEntity(e);
|
||||
}
|
||||
}
|
||||
level->addEntity(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HeavyTile::falling(shared_ptr<FallingTile> entity)
|
||||
{
|
||||
}
|
||||
|
||||
int HeavyTile::getTickDelay()
|
||||
int HeavyTile::getTickDelay(Level *level)
|
||||
{
|
||||
return 5;
|
||||
return 2;
|
||||
}
|
||||
|
||||
bool HeavyTile::isFree(Level *level, int x, int y, int z)
|
||||
{
|
||||
int t = level->getTile(x, y, z);
|
||||
if (t == 0) return true;
|
||||
if (t == Tile::fire_Id) return true;
|
||||
Material *material = Tile::tiles[t]->material;
|
||||
if (material == Material::water) return true;
|
||||
if (material == Material::lava) return true;
|
||||
return false;
|
||||
int t = level->getTile(x, y, z);
|
||||
if (t == 0) return true;
|
||||
if (t == Tile::fire_Id) return true;
|
||||
Material *material = Tile::tiles[t]->material;
|
||||
if (material == Material::water) return true;
|
||||
if (material == Material::lava) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void HeavyTile::onLand(Level *level, int xt, int yt, int zt, int data)
|
||||
|
||||
Reference in New Issue
Block a user