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
-
Method Summary
Modifier and TypeMethodDescriptionvoidClears the stored blueprint@Nullable com.ldtteam.structurize.blueprints.v1.BlueprintGet the stored blueprint@Nullable net.minecraft.world.phys.AABBGet the blueprints Boundingbox@NotNull net.minecraft.core.BlockPosGet the position of the Citizen that the Work Order is claimed by.Get the related colony or viewintGet the current level of the structure of the work order.net.minecraft.network.chat.ComponentGet the name of the work order, provides the custom name or the work order name when no custom name is givendefault StringGet the file name of the structure.intgetID()Get the ID of the work order.net.minecraft.core.BlockPosGet the current location of the buildingintGetter for the priority.com.ldtteam.structurize.api.RotationMirrorGet the current rotation and mirror of the buildinggetStage()The buildings stageGet the structure this work order should be using, if any.Get the structure this work order should be using, if any.intGet the target level of the structure of the work order.The name of the work order.The type of the work order.booleanIs the Work Order claimed?voidloadBlueprint(net.minecraft.world.level.Level world, Consumer<com.ldtteam.structurize.blueprints.v1.Blueprint> afterLoad) Loads the blueprint if necessaryvoidsetBlueprint(com.ldtteam.structurize.blueprints.v1.Blueprint blueprint, net.minecraft.world.level.Level world) Store a blueprint referencevoidsetClaimedBy(net.minecraft.core.BlockPos builder) Set the Work order as claimed by a given building.voidSet the related colony or viewvoidsetID(int id) Set the ID of the work order.voidsetPriority(int priority) Setter for the priority.
-
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 useafterLoad- 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
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
Set the related colony or view -
getStage
BuildingProgressStage getStage()The buildings stage- Returns:
- stage index
-