Interface ISimulationController

All Known Implementing Classes:
SimulationController

public interface ISimulationController
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.entity.player.Player
    Get the player currently trying to hack the security station.
    Get the simulation object for the given side (player or AI)
    boolean
    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
    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
    Called every game tick (both client and server) by the owning security station block entity.
    void
    toBytes(net.minecraft.network.FriendlyByteBuf buf)
    Serialize the simulation controller for sync to client on open of hacking GUI
  • Method Details

    • onConnectionStarted

      void onConnectionStarted(HackSimulation hackSimulation, int fromPos, int toPos, float initialProgress)
      A connection from one node to another has just begun.
      Parameters:
      hackSimulation - the simulation
      fromPos - position of the hacking node
      toPos - position of the target node
      initialProgress - initial progress of the connection (usually but not necessarily 0)
    • onNodeHacked

      void onNodeHacked(HackSimulation hackSimulation, int pos)
      A simulation has just had a node hacked (connection completed).
      Parameters:
      hackSimulation - the simulation
      pos - position of the newly hacked node
    • onNodeFortified

      void onNodeFortified(HackSimulation hackSimulation, int pos)
      A simulation has just had a hacked node fortified by the player
      Parameters:
      hackSimulation - the simulation
      pos - position of the newly fortified node
    • tick

      void tick()
      Called every game tick (both client and server) by the owning security station block entity.
    • isSimulationDone

      boolean isSimulationDone()
      Are we done with this hack simulation?
      Returns:
      true if finished, false otherwise
    • getSimulation

      Get the simulation object for the given side (player or AI)
      Parameters:
      side - the side to get
      Returns:
      the simulation
    • getHacker

      net.minecraft.world.entity.player.Player getHacker()
      Get the player currently trying to hack the security station. This does not validate if the player is still online.
      Returns:
      the player
    • isJustTesting

      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.
      Returns:
      true if just testing, false otherwise
    • toBytes

      void toBytes(net.minecraft.network.FriendlyByteBuf buf)
      Serialize the simulation controller for sync to client on open of hacking GUI
      Parameters:
      buf - packet buffer