diff --git a/src/main/java/appeng/core/AEConfig.java b/src/main/java/appeng/core/AEConfig.java index b35b2ce3..0b407857 100644 --- a/src/main/java/appeng/core/AEConfig.java +++ b/src/main/java/appeng/core/AEConfig.java @@ -100,6 +100,7 @@ public final class AEConfig extends Configuration implements IConfigurableObject private double WirelessBoosterRangeMultiplier = 1; private double WirelessBoosterExp = 1.5; public int ItemTypeLimit = 63; + public boolean NeedController = false; public AEConfig( final File configFile ) { @@ -160,7 +161,8 @@ public final class AEConfig extends Configuration implements IConfigurableObject this.colorApplicatorBattery = this.get( "battery", "colorApplicator", this.colorApplicatorBattery ).getInt( this.colorApplicatorBattery ); this.matterCannonBattery = this.get( "battery", "matterCannon", this.matterCannonBattery ).getInt( this.matterCannonBattery ); - this.ItemTypeLimit = this.get( "storage", "typeLimit", this.ItemTypeLimit ).getInt( this.ItemTypeLimit ); + this.ItemTypeLimit = this.get( "tileraedition", "typeLimit", this.ItemTypeLimit ).getInt( this.ItemTypeLimit ); + this.NeedController = this.get("tileraedition", "needController", this.NeedController).getBoolean( this.NeedController ); this.clientSync(); diff --git a/src/main/java/appeng/me/cache/PathGridCache.java b/src/main/java/appeng/me/cache/PathGridCache.java index 0df65a2f..b0eb212e 100644 --- a/src/main/java/appeng/me/cache/PathGridCache.java +++ b/src/main/java/appeng/me/cache/PathGridCache.java @@ -94,23 +94,26 @@ public class PathGridCache implements IPathingGrid this.myGrid.getPivot().beginVisit( new AdHocChannelUpdater( used ) ); } - else if( this.controllerState == ControllerState.NO_CONTROLLER ) - { - final int requiredChannels = this.calculateRequiredChannels(); - int used = requiredChannels; - if( requiredChannels > 8 ) - { - used = 0; + else if( this.controllerState == ControllerState.NO_CONTROLLER ) { + if (AEConfig.instance.NeedController) { + this.ticksUntilReady = 20; + this.myGrid.getPivot().beginVisit( new AdHocChannelUpdater( 0 ) ); + } else { + final int requiredChannels = this.calculateRequiredChannels(); + int used = requiredChannels; + if (requiredChannels > 8) { + used = 0; + } + + final int nodes = this.myGrid.getNodes().size(); + this.setChannelsInUse(used); + + this.ticksUntilReady = 20 + Math.max(0, nodes / 100 - 20); + this.setChannelsByBlocks(nodes * used); + this.setChannelPowerUsage(this.getChannelsByBlocks() / 128.0); + + this.myGrid.getPivot().beginVisit(new AdHocChannelUpdater(used)); } - - final int nodes = this.myGrid.getNodes().size(); - this.setChannelsInUse( used ); - - this.ticksUntilReady = 20 + Math.max( 0, nodes / 100 - 20 ); - this.setChannelsByBlocks( nodes * used ); - this.setChannelPowerUsage( this.getChannelsByBlocks() / 128.0 ); - - this.myGrid.getPivot().beginVisit( new AdHocChannelUpdater( used ) ); } else if( this.controllerState == ControllerState.CONTROLLER_CONFLICT ) {