public class HackSimulation
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HackSimulation.ConnectionEntry |
class |
HackSimulation.Node |
| Modifier and Type | Field and Description |
|---|---|
java.util.List<HackSimulation.ConnectionEntry> |
allConnections |
static int |
GRID_HEIGHT |
static int |
GRID_SIZE |
static int |
GRID_WIDTH |
static int |
NODE_FORTIFICATION_TIME |
| Constructor and Description |
|---|
HackSimulation(ISimulationController controller,
int startPosition,
float baseBridgeSpeed,
ISimulationController.HackingSide side)
Create a new simulation object
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateNukeVirus(int pos) |
void |
addNode(int position,
ItemNetworkComponent.NetworkComponentType type,
int count) |
void |
addNode(int slot,
net.minecraft.item.ItemStack stack) |
void |
applyStopWorm(int duration) |
static HackSimulation |
dummySimulation() |
void |
fortify(int pos)
Fortify a player-hacked node, making it harder for the AI to hack.
|
int |
getHackedNeighbour(int nodePos) |
java.util.List<java.lang.Integer> |
getNeighbours(int node) |
HackSimulation.Node |
getNodeAt(int pos) |
long |
getRemainingTraceTime() |
ISimulationController.HackingSide |
getSide() |
boolean |
initiateNukeVirus(int pos) |
boolean |
isAwake() |
boolean |
isHackComplete() |
boolean |
isNukeVirusReady() |
boolean |
isStarted() |
boolean |
isStopWormed() |
static HackSimulation |
readFromNetwork(net.minecraft.network.PacketBuffer buffer) |
void |
setHackComplete() |
void |
startHack(int targetPos) |
void |
syncFromServer(java.util.List<HackSimulation.ConnectionEntry> newConns) |
void |
tick() |
void |
updateFortification(java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.Integer,java.lang.Integer>> fortification) |
void |
wakeUp() |
void |
writeToNetwork(net.minecraft.network.PacketBuffer buffer) |
public static final int GRID_WIDTH
public static final int GRID_HEIGHT
public static final int GRID_SIZE
public static final int NODE_FORTIFICATION_TIME
public final java.util.List<HackSimulation.ConnectionEntry> allConnections
public HackSimulation(ISimulationController controller, int startPosition, float baseBridgeSpeed, ISimulationController.HackingSide side)
controller - the simulation controllerstartPosition - where the player or AI starts in this simulationbaseBridgeSpeed - base speed for hacking between nodesside - is this simulation AI controlled?public static HackSimulation dummySimulation()
public static HackSimulation readFromNetwork(net.minecraft.network.PacketBuffer buffer)
public void writeToNetwork(net.minecraft.network.PacketBuffer buffer)
public void addNode(int position,
ItemNetworkComponent.NetworkComponentType type,
int count)
public void addNode(int slot,
net.minecraft.item.ItemStack stack)
public HackSimulation.Node getNodeAt(int pos)
public boolean isHackComplete()
public boolean isNukeVirusReady()
public ISimulationController.HackingSide getSide()
public void tick()
public void activateNukeVirus(int pos)
public java.util.List<java.lang.Integer> getNeighbours(int node)
public void startHack(int targetPos)
public boolean initiateNukeVirus(int pos)
public void applyStopWorm(int duration)
public void fortify(int pos)
pos - the node positionpublic void wakeUp()
public boolean isAwake()
public void setHackComplete()
public void syncFromServer(java.util.List<HackSimulation.ConnectionEntry> newConns)
public void updateFortification(java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.Integer,java.lang.Integer>> fortification)
public long getRemainingTraceTime()
public int getHackedNeighbour(int nodePos)
public boolean isStarted()
public boolean isStopWormed()