Added Energy Watcher API
Added Event to Recalculate Channel Requirements for a Node. Level Emitter can now output redstone based on network energy levels. Level Emitter's entry field can now hold longs ( text box supports up o trillions )
This commit is contained in:
Vendored
+15
@@ -16,7 +16,9 @@ import appeng.api.networking.IGridMultiblock;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.IGridStorage;
|
||||
import appeng.api.networking.events.MENetworkBootingStatusChange;
|
||||
import appeng.api.networking.events.MENetworkChannelChanged;
|
||||
import appeng.api.networking.events.MENetworkControllerChange;
|
||||
import appeng.api.networking.events.MENetworkEventSubscribe;
|
||||
import appeng.api.networking.pathing.ControllerState;
|
||||
import appeng.api.networking.pathing.IPathingGrid;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
@@ -212,6 +214,19 @@ public class PathGridCache implements IPathingGrid
|
||||
repath();
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
void updateNodReq(MENetworkChannelChanged ev)
|
||||
{
|
||||
IGridNode gridNode = ev.node;
|
||||
|
||||
if ( gridNode.getGridBlock().getFlags().contains( GridFlags.REQUIRE_CHANNEL ) )
|
||||
requireChannels.add( gridNode );
|
||||
else
|
||||
requireChannels.remove( gridNode );
|
||||
|
||||
repath();
|
||||
}
|
||||
|
||||
private void recalcController()
|
||||
{
|
||||
recalculateControllerNextTick = false;
|
||||
|
||||
Reference in New Issue
Block a user