Made Laser Outputting less unnecessarily for-loopy

This commit is contained in:
Ellpeck 2015-11-12 17:56:57 +01:00
parent f9634ef550
commit 093a69ed13
3 changed files with 11 additions and 6 deletions

View file

@ -101,13 +101,13 @@ public class InitBlocks{
public static Block blockLaserRelay; public static Block blockLaserRelay;
public static Block blockBlackLotus; public static Block blockBlackLotus;
//public static Block blockCrystal; public static Block blockCrystal;
public static void init(){ public static void init(){
ModUtil.LOGGER.info("Initializing Blocks..."); ModUtil.LOGGER.info("Initializing Blocks...");
//blockCrystal = new BlockCrystal(); blockCrystal = new BlockCrystal();
//BlockUtil.register(blockCrystal, BlockCrystal.TheItemBlock.class); BlockUtil.register(blockCrystal, BlockCrystal.TheItemBlock.class);
blockBlackLotus = new BlockBlackLotus(); blockBlackLotus = new BlockBlackLotus();
BlockUtil.register(blockBlackLotus); BlockUtil.register(blockBlackLotus);

View file

@ -128,13 +128,13 @@ public class InitItems{
public static Item itemChestToCrateUpgrade; public static Item itemChestToCrateUpgrade;
public static Item itemLaserWrench; public static Item itemLaserWrench;
//public static Item itemCrystal; public static Item itemCrystal;
public static void init(){ public static void init(){
ModUtil.LOGGER.info("Initializing Items..."); ModUtil.LOGGER.info("Initializing Items...");
//itemCrystal = new ItemCrystal(); itemCrystal = new ItemCrystal();
//ItemUtil.register(itemCrystal); ItemUtil.register(itemCrystal);
itemLaserWrench = new ItemLaserWrench(); itemLaserWrench = new ItemLaserWrench();
ItemUtil.register(itemLaserWrench); ItemUtil.register(itemLaserWrench);

View file

@ -185,6 +185,11 @@ public class LaserRelayConnectionHandler{
transmitted += ((IEnergyReceiver)tile).receiveEnergy(side.getOpposite(), theoreticalReceived-deduct, simulate); transmitted += ((IEnergyReceiver)tile).receiveEnergy(side.getOpposite(), theoreticalReceived-deduct, simulate);
transmitted += deduct; transmitted += deduct;
//If everything that could be transmitted was transmitted
if(transmitted >= maxTransfer){
return transmitted;
}
} }
} }
} }