feat: remove iron bars

This commit is contained in:
str1k3r committed 2026-10-08 20:35:52 -04:00
1 parent 7c6ed9dbcb
commit 6315c27226
12 files changed
+2 -87

No files matched your search

-49
View File
@@ -119,55 +119,6 @@ bool SpikeFeature::placeWithIndex(Level *level, Random *random, int x, int y, in
}
}
// cap the last spikes with a fence to stop lucky arrows hitting the crystal
if(iIndex>5)
{
for (int yy = y; yy < y + hh; yy++)
{
if (yy < Level::genDepth)
{
for (int xx = x - 2; xx <= x + 2; xx++)
{
for (int zz = z - 2; zz <= z + 2; zz++)
{
int xd = xx - x;
int zd = zz - z;
int iVal = xd * xd + zd * zd;
if ( iVal >= 2 * 2)
{
if(yy==(y + hh - 1))
{
placeBlock(level, xx, y + hh, zz, Tile::ironFence_Id, 0);
placeBlock(level, xx, y + hh +1, zz, Tile::ironFence_Id, 0);
placeBlock(level, xx, y + hh +2, zz, Tile::ironFence_Id, 0);
}
}
}
}
}
else
{
app.DebugPrintf("Breaking out of spike feature\n");
break;
}
}
// and cap off the top
int yy = y + hh + 3;
if (yy < Level::genDepth)
{
for (int xx = x - 2; xx <= x + 2; xx++)
{
for (int zz = z - 2; zz <= z + 2; zz++)
{
placeBlock(level, xx, yy, zz, Tile::ironFence_Id, 0);
}
}
}
}
shared_ptr<EnderCrystal> enderCrystal = shared_ptr<EnderCrystal>(new EnderCrystal(level));
enderCrystal->moveTo(x + 0.5f, y + hh, z + 0.5f, random->nextFloat() * 360, 0);
level->addEntity(enderCrystal);