Removed no channels pathing.

Also use default values for features without a config option
This commit is contained in:
yueh
2020-06-28 19:19:05 +02:00
parent 4ee44970b6
commit 55d7ac82e5
2 changed files with 2 additions and 11 deletions
+1 -1
View File
@@ -203,7 +203,7 @@ public final class AEConfig {
}
public boolean isFeatureEnabled(final AEFeature f) {
return this.featureFlags.contains(f);
return (!f.isConfig() && f.isEnabled()) || this.featureFlags.contains(f);
}
public boolean areFeaturesEnabled(Collection<AEFeature> features) {
+1 -10
View File
@@ -95,16 +95,7 @@ public class PathGridCache implements IPathingGrid {
this.updateNetwork = false;
this.setChannelsInUse(0);
if (!AEConfig.instance().isFeatureEnabled(AEFeature.CHANNELS)) {
final int used = this.calculateRequiredChannels();
final int nodes = this.myGrid.getNodes().size();
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.NO_CONTROLLER) {
if (this.controllerState == ControllerState.NO_CONTROLLER) {
final int requiredChannels = this.calculateRequiredChannels();
int used = requiredChannels;
if (requiredChannels > 8) {