Performance Improvements When Channel Is Disabled (#190)

* enable parts and controller even when channel is disabled

* make me controller usable for channelless networks

* apply @talchas's performance optimization for channelless config
This commit is contained in:
xyqyear authored and GitHub committed 2022-10-08 13:10:59 +02:00
1 parent 0948398921
commit 24e4bd608c
6 files changed
+49 -25

No files matched your search

+2 -11
View File
@@ -77,19 +77,10 @@ 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) {
if (AEConfig.instance.isFeatureEnabled(AEFeature.Channels) && requiredChannels > 8) {
used = 0;
}