From ce7fbaaeb07cf92a04dcfcb7f98c1ee074315f44 Mon Sep 17 00:00:00 2001 From: Ben Spiers Date: Sat, 11 Jan 2014 02:53:09 +0000 Subject: [PATCH] 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. --- .../common/tile/TileEntitySolarGenerator.java | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/common/mekanism/generators/common/tile/TileEntitySolarGenerator.java b/common/mekanism/generators/common/tile/TileEntitySolarGenerator.java index c87154552..85aab487d 100644 --- a/common/mekanism/generators/common/tile/TileEntitySolarGenerator.java +++ b/common/mekanism/generators/common/tile/TileEntitySolarGenerator.java @@ -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);