Interface IBuilderWorkOrder

All Superinterfaces:
IServerWorkOrder, IWorkOrder
All Known Implementing Classes:
AbstractWorkOrder, WorkOrderBuilding, WorkOrderDecoration, WorkOrderMiner, WorkOrderPlantationField

public interface IBuilderWorkOrder extends IServerWorkOrder
  • Method Details

    • getAmountOfResources

      int getAmountOfResources()
      Get the amount of resources this work order still requires.
      Returns:
      the amount of resources.
    • setAmountOfResources

      void setAmountOfResources(int newQuantity)
      Set the amount of resources this work order still requires.
      Parameters:
      newQuantity - the new amount of resources.
    • getIteratorType

      String getIteratorType()
      Get the iterator type (method of construction) of the work order.
      Returns:
      the iterator type.
    • setIteratorType

      void setIteratorType(String iteratorType)
      Set the iterator type (method of construction) of the work order.
      Parameters:
      iteratorType - the new iterator type.
    • isCleared

      boolean isCleared()
      Whether the area of the work order has been cleared out or not.
      Returns:
      true if the area is cleared.
    • setCleared

      void setCleared(boolean cleared)
      Set whether the area of the work order has been cleared out or not.
      Parameters:
      cleared - the new cleared state.
    • setRequested

      void setRequested(boolean requested)
      Set whether the building has been cleared.
      Parameters:
      requested - true if the building has been cleared.
    • isRequested

      boolean isRequested()
      Set whether the resources for this work order have been requested.
      Returns:
      true when the resources are requested.
    • onCompleted

      void onCompleted(IColony colony, ICitizenData citizen)
      Executed when a work order is completed.

      Override this when something need to be done when the work order is completed

      Parameters:
      colony - in which the work order exist
      citizen - citizen that completed the work order
    • onRemoved

      void onRemoved(IColony colony)
      Executed when a work order is removed.

      Override this when something need to be done when the work order is removed

      Parameters:
      colony - in which the work order exist
    • canBeResolved

      boolean canBeResolved(IColony colony, int level)
      Check if this workOrder can be resolved by an existing builder.
      Parameters:
      colony - the colony to check in.
      level - the new level of the building.
      Returns:
      true if so.
    • tooFarFromAnyBuilder

      boolean tooFarFromAnyBuilder(IColony colony, int level)
      Check if this workOrder can be resolved by an existing builder by distance.
      Parameters:
      colony - the colony to check in.
      level - the new level of the building.
      Returns:
      true if so.
    • canBuildIgnoringDistance

      boolean canBuildIgnoringDistance(@NotNull @NotNull IBuilding building, @NotNull @NotNull net.minecraft.core.BlockPos builderLocation, int builderLevel)
      Checks if a builder may accept this workOrder while ignoring the distance to the builder.
      Parameters:
      builderLocation - position of the builders own hut.
      builderLevel - level of the builders hut.
      Returns:
      true if so.
    • setStage

      void setStage(BuildingProgressStage stage)
      Sets the building stage of the workorder
      Parameters:
      stage -