Class PendingConnectionNode

java.lang.Object
com.minecolonies.api.colony.connections.ColonyConnectionNode
com.minecolonies.api.colony.connections.PendingConnectionNode

public class PendingConnectionNode extends ColonyConnectionNode
Pending connected colony data while pathfinding is still trying to connect.
  • Constructor Details

    • PendingConnectionNode

      public PendingConnectionNode(net.minecraft.core.BlockPos pos, PathResult<PathJobMoveToLocation> pathResult, PendingConnectionNode.PendingConnectionType connectionType)
      Create a new pending node.
      Parameters:
      pos - it's pos.
      pathResult - the path result.
      connectionType - the connection type.
    • PendingConnectionNode

      public PendingConnectionNode(net.minecraft.core.BlockPos pos)
      Constructor for deserialization/serialization.
  • Method Details

    • write

      public net.minecraft.nbt.CompoundTag write()
      Write connections to NBT data for saving.
      Overrides:
      write in class ColonyConnectionNode
      Returns:
      compound NBT-Tag.
    • read

      public void read(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound)
      Read connections from saved NBT data.
      Overrides:
      read in class ColonyConnectionNode
      Parameters:
      compound - NBT Tag.
    • getPendingConnectionType

      public PendingConnectionNode.PendingConnectionType getPendingConnectionType()
      If this is a regular connection, or a mending connection (pending connection does not destroy sign if fail to path) or a colony connection.
      Returns:
      the enum type.
    • setCachedPathResult

      public void setCachedPathResult(PathResult<PathJobMoveToLocation> cachedPathResult)
      Store the cached path result.
      Parameters:
      cachedPathResult - the cached path result.
    • getCachedPathResult

      @Nullable public @Nullable PathResult<PathJobMoveToLocation> getCachedPathResult()
      Get the cached path result.
      Returns:
      the cached path result.