Interface IWorkOrder

All Known Subinterfaces:
IBuilderWorkOrder, IServerWorkOrder, IWorkOrderView
All Known Implementing Classes:
AbstractWorkOrder, AbstractWorkOrderView, WorkOrderBuilding, WorkOrderBuildingView, WorkOrderDecoration, WorkOrderDecorationView, WorkOrderMiner, WorkOrderMinerView, WorkOrderPlantationField, WorkOrderPlantationFieldView

public interface IWorkOrder
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Comparator<IWorkOrder>
    Orders work orders by their user-selected priority, with a stable tie-breaker.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears the stored blueprint
    @Nullable com.ldtteam.structurize.blueprints.v1.Blueprint
    Get the stored blueprint
    @Nullable net.minecraft.world.phys.AABB
    Get the blueprints Boundingbox
    @NotNull net.minecraft.core.BlockPos
    Get the position of the Citizen that the Work Order is claimed by.
    Get the related colony or view
    int
    Get the current level of the structure of the work order.
    net.minecraft.network.chat.Component
    Get the name of the work order, provides the custom name or the work order name when no custom name is given
    default String
    Get the file name of the structure.
    int
    Get the ID of the work order.
    net.minecraft.core.BlockPos
    Get the current location of the building
    int
    Getter for the priority.
    com.ldtteam.structurize.api.RotationMirror
    Get the current rotation and mirror of the building
    The buildings stage
    Get the structure this work order should be using, if any.
    Get the structure this work order should be using, if any.
    int
    Get the target level of the structure of the work order.
    The name of the work order.
    The type of the work order.
    boolean
    Is the Work Order claimed?
    void
    loadBlueprint(net.minecraft.world.level.Level world, Consumer<com.ldtteam.structurize.blueprints.v1.Blueprint> afterLoad)
    Loads the blueprint if necessary
    void
    setBlueprint(com.ldtteam.structurize.blueprints.v1.Blueprint blueprint, net.minecraft.world.level.Level world)
    Store a blueprint reference
    void
    setClaimedBy(net.minecraft.core.BlockPos builder)
    Set the Work order as claimed by a given building.
    void
    Set the related colony or view
    void
    setID(int id)
    Set the ID of the work order.
    void
    setPriority(int priority)
    Setter for the priority.
  • Field Details

    • WORK_ORDER_COMPARATOR

      static final Comparator<IWorkOrder> WORK_ORDER_COMPARATOR
      Orders work orders by their user-selected priority, with a stable tie-breaker.
  • Method Details

    • getID

      int getID()
      Get the ID of the work order.
      Returns:
      ID of the work order
    • setID

      void setID(int id)
      Set the ID of the work order.
      Parameters:
      id - the new ID for the work order
    • getPriority

      int getPriority()
      Getter for the priority.
      Returns:
      the priority of the work order.
    • setPriority

      void setPriority(int priority)
      Setter for the priority.
      Parameters:
      priority - the new priority.
    • getStructurePath

      String getStructurePath()
      Get the structure this work order should be using, if any.
      Returns:
      the schematic path.
    • getStructurePack

      String getStructurePack()
      Get the structure this work order should be using, if any.
      Returns:
      the pack name.
    • loadBlueprint

      void loadBlueprint(net.minecraft.world.level.Level world, Consumer<com.ldtteam.structurize.blueprints.v1.Blueprint> afterLoad)
      Loads the blueprint if necessary
      Parameters:
      world - world to use
      afterLoad - consumes the loaded blueprint or null
    • getCurrentLevel

      int getCurrentLevel()
      Get the current level of the structure of the work order.
      Returns:
      the current level.
    • getTargetLevel

      int getTargetLevel()
      Get the target level of the structure of the work order.
      Returns:
      the target level.
    • getTranslationKey

      String getTranslationKey()
      The name of the work order.
      Returns:
      the work order name.
    • getWorkOrderType

      WorkOrderType getWorkOrderType()
      The type of the work order.
      Returns:
      the work order type.
    • getLocation

      net.minecraft.core.BlockPos getLocation()
      Get the current location of the building
      Returns:
      the location
    • getRotationMirror

      com.ldtteam.structurize.api.RotationMirror getRotationMirror()
      Get the current rotation and mirror of the building
      Returns:
      the location
    • isClaimed

      boolean isClaimed()
      Is the Work Order claimed?
      Returns:
      true if the Work Order has been claimed
    • getClaimedBy

      @NotNull @NotNull net.minecraft.core.BlockPos getClaimedBy()
      Get the position of the Citizen that the Work Order is claimed by.
      Returns:
      ID of citizen the Work Order has been claimed by, BLockpos.ZERO
    • setClaimedBy

      void setClaimedBy(net.minecraft.core.BlockPos builder)
      Set the Work order as claimed by a given building.
      Parameters:
      builder - the building position.
    • getDisplayName

      net.minecraft.network.chat.Component getDisplayName()
      Get the name of the work order, provides the custom name or the work order name when no custom name is given
      Returns:
      the display name for the work order
    • getFileName

      default String getFileName()
      Get the file name of the structure. Calculates the file name from the path.
      Returns:
      the name without the appendix.
    • setBlueprint

      void setBlueprint(com.ldtteam.structurize.blueprints.v1.Blueprint blueprint, net.minecraft.world.level.Level world)
      Store a blueprint reference
      Parameters:
      blueprint -
    • getBlueprint

      @Nullable @Nullable com.ldtteam.structurize.blueprints.v1.Blueprint getBlueprint()
      Get the stored blueprint
      Returns:
    • clearBlueprint

      void clearBlueprint()
      Clears the stored blueprint
    • getBoundingBox

      @Nullable @Nullable net.minecraft.world.phys.AABB getBoundingBox()
      Get the blueprints Boundingbox
    • getColony

      IColony getColony()
      Get the related colony or view
      Returns:
    • setColony

      void setColony(IColony colony)
      Set the related colony or view
    • getStage

      The buildings stage
      Returns:
      stage index