case 2 : z--; break;
case 3 : z++; break;
case 4 : x--; break;
case 5 : x++; break;
}
blockLightOverrides.add(new Vector3i(x, y, z));
mc.theWorld.setLightValue(EnumSkyBlock.Block, x, y, z, 12);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y + 1, z);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y - 1, z);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x + 1, y, z);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x - 1, y, z);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y, z + 1);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y, z - 1);
}
}
}
}
}
for(Object obj : mc.theWorld.loadedEntityList)
{
if(obj instanceof EntityBullet)
{
EntityBullet bullet = (EntityBullet)obj;
if(!bullet.isDead && bullet.type.hasLight)
{
int x = MathHelper.floor_double(bullet.posX);
int y = MathHelper.floor_double(bullet.posY);
int z = MathHelper.floor_double(bullet.posZ);
blockLightOverrides.add(new Vector3i(x, y, z));
mc.theWorld.setLightValue(EnumSkyBlock.Block, x, y, z, 15);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y + 1, z);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y - 1, z);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x + 1, y, z);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x - 1, y, z);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y, z + 1);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y, z - 1);
}
}
else if(obj instanceof EntityMecha)
{
EntityMecha mecha = (EntityMecha)obj;
int x = MathHelper.floor_double(mecha.posX);
int y = MathHelper.floor_double(mecha.posY);
int z = MathHelper.floor_double(mecha.posZ);
if(mecha.lightLevel() > 0)
{
blockLightOverrides.add(new Vector3i(x, y, z));
mc.theWorld.setLightValue(EnumSkyBlock.Block, x, y, z, Math.max(mc.theWorld.getBlockLightValue(x, y, z), mecha.lightLevel()));
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x + 1, y, z);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x - 1, y + 1, z);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y + 1, z);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y - 1, z);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y, z + 1);
mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y, z - 1);
}
if(mecha.forceDark())
{
for(int i = -3; i <= 3; i++)
{
for(int j = -3; j <= 3; j++)
{
for(int k = -3; k <= 3; k++)
{
int xd = i + x;
int yd = j + y;
int zd = k + z;
blockLightOverrides.add(new Vector3i(xd, yd, zd));
mc.theWorld.setLightValue(EnumSkyBlock.Sky, xd, yd, zd, Math.abs(i) + Math.abs(j) + Math.abs(k));
}
}
}
}