Remove a loop in the solar generator code that was causing a big performance hit. As far as I can tell all it did was disable it if there were other solars above. By all means put it back if it was more important than that.
This commit is contained in:
parent
f87c27aeee
commit
ce7fbaaeb0
1 changed files with 1 additions and 16 deletions
|
@ -75,22 +75,7 @@ public class TileEntitySolarGenerator extends TileEntityGenerator
|
|||
else {
|
||||
seesSun = false;
|
||||
}
|
||||
|
||||
for(int y = yCoord+1; y < 256; y++)
|
||||
{
|
||||
Coord4D obj = new Coord4D(xCoord, y, zCoord, worldObj.provider.dimensionId);
|
||||
Block block = Block.blocksList[obj.getBlockId(worldObj)];
|
||||
|
||||
if(block != null)
|
||||
{
|
||||
if(block.isOpaqueCube() || block.blockID == MekanismGenerators.generatorID && obj.getMetadata(worldObj) == GeneratorType.SOLAR_GENERATOR.meta)
|
||||
{
|
||||
seesSun = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(canOperate())
|
||||
{
|
||||
setActive(true);
|
||||
|
|
Loading…
Reference in a new issue