mirror of
https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial.git
synced 2026-11-22 21:19:42 +00:00
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:
1 parent
0948398921
commit
24e4bd608c
6 files changed
+49
-25
No files matched your search
+2
-11
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user