Interface IColonyConnectionManager

All Superinterfaces:
net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
All Known Implementing Classes:
ColonyConnectionManager

public interface IColonyConnectionManager extends net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Connection manager interface.
  • Method Details

    • addNewConnectionNode

      boolean addNewConnectionNode(net.minecraft.core.BlockPos connectionPoint)
      Add a new connection point and connect to neighbors.
      Parameters:
      connectionPoint - the node position.
      Returns:
    • removeConnectionNode

      void removeConnectionNode(net.minecraft.core.BlockPos connectionPoint)
      Remove a connection point and update neighbors.
      Parameters:
      connectionPoint - the node position.
    • tick

      void tick()
      Tick to process work.
    • getDirectlyConnectedColonies

      TreeMap<Integer,ColonyConnection> getDirectlyConnectedColonies()
      Get all directly connected colonies.
      Returns:
      the map of directly connected colonies.
    • getIndirectlyConnectedColonies

      TreeMap<Integer,ColonyConnection> getIndirectlyConnectedColonies()
      Get all indirectly connected colonies.
      Returns:
      the map of them.
    • getNode

      ColonyConnectionNode getNode(net.minecraft.core.BlockPos blockPos)
      Get a connection node.
      Parameters:
      blockPos - its position.
      Returns:
      the node object.
    • addNewGateHouse

      void addNewGateHouse(net.minecraft.core.BlockPos gateHousePosition)
      Add a new gatehouse.
      Parameters:
      gateHousePosition - the blockpos.
    • removeGateHouse

      void removeGateHouse(net.minecraft.core.BlockPos gateHousePosition)
      Remove a gatehouse.
      Parameters:
      gateHousePosition - the blockpos.
    • attemptEstablishConnection

      boolean attemptEstablishConnection(net.minecraft.core.BlockPos clickedPos, IColony targetColony)
      Attempt to establish a connection.
      Parameters:
      clickedPos - the clicked position.
      targetColony - , the colony we're trying to connect to.
    • serializeToView

      void serializeToView(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf)
      Serialize connection manager to view.
      Parameters:
      buf - the buf to serialize it to.
    • deserializeFromView

      void deserializeFromView(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf)
      Deserialize connection manager from buffer for client side usage.
      Parameters:
      buf - the buf to read it from.
    • triggerConnectionEvent

      void triggerConnectionEvent(ConnectionEvent connectionEventData)
      Trigger a connection event at a colony.
      Parameters:
      connectionEventData - the source colony data.
    • getConnectionEvents

      List<ConnectionEvent> getConnectionEvents()
      Get the list of connection events.
      Returns:
      the connection events.
    • getColonyDiplomacyStatus

      DiplomacyStatus getColonyDiplomacyStatus(int id)
      Get colony diplomacy status by id.
      Parameters:
      id - the id to query from.
      Returns:
      the diplomacy status.