public interface ISimulationController
| Modifier and Type | Interface and Description |
|---|---|
static class |
ISimulationController.HackingSide |
| Modifier and Type | Method and Description |
|---|---|
net.minecraft.entity.player.PlayerEntity |
getHacker()
Get the player currently trying to hack the security station.
|
HackSimulation |
getSimulation(ISimulationController.HackingSide side)
Get the simulation object for the given side (player or AI)
|
boolean |
isJustTesting()
Is this just a test by the station's owner, or other whitelisted player? If just testing, the security
station will not retaliate on a failed hack.
|
boolean |
isSimulationDone()
Are we done with this hack simulation?
|
void |
onConnectionStarted(HackSimulation hackSimulation,
int fromPos,
int toPos,
float initialProgress)
A connection from one node to another has just begun.
|
void |
onNodeFortified(HackSimulation hackSimulation,
int pos)
A simulation has just had a hacked node fortified by the player
|
void |
onNodeHacked(HackSimulation hackSimulation,
int pos)
A simulation has just had a node hacked (connection completed).
|
void |
tick()
Called every game tick (both client and server) by the owning security station tile entity.
|
void |
toBytes(net.minecraft.network.PacketBuffer buf)
Serialize the simulation controller for sync to client on open of hacking GUI
|
void onConnectionStarted(HackSimulation hackSimulation, int fromPos, int toPos, float initialProgress)
hackSimulation - the simulationfromPos - position of the hacking nodetoPos - position of the target nodeinitialProgress - initial progress of the connection (usually but not necessarily 0)void onNodeHacked(HackSimulation hackSimulation, int pos)
hackSimulation - the simulationpos - position of the newly hacked nodevoid onNodeFortified(HackSimulation hackSimulation, int pos)
hackSimulation - the simulationpos - position of the newly fortified nodevoid tick()
boolean isSimulationDone()
HackSimulation getSimulation(ISimulationController.HackingSide side)
side - the side to getnet.minecraft.entity.player.PlayerEntity getHacker()
boolean isJustTesting()
void toBytes(net.minecraft.network.PacketBuffer buf)
buf - packet buffer