mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-28 15:46:01 +00:00
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:
1 parent
f87c27aeee
commit
ce7fbaaeb0
1 file changed
+1
-16
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user