Class WorkOrderDecoration
java.lang.Object
com.minecolonies.core.colony.workorders.AbstractWorkOrder
com.minecolonies.core.colony.workorders.WorkOrderDecoration
- All Implemented Interfaces:
IBuilderWorkOrder,IServerWorkOrder,IWorkOrder
A work order that the build can take to build decorations.
-
Field Summary
Fields inherited from class com.minecolonies.core.colony.workorders.AbstractWorkOrder
blueprint, box, changed, colony, future, packNameFields inherited from interface com.minecolonies.api.colony.workorders.IWorkOrder
WORK_ORDER_COMPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if a builder may accept this workOrder.booleancanBuildIgnoringDistance(@NotNull IBuilding building, net.minecraft.core.BlockPos position, int level) Checks if a builder may accept this workOrder while ignoring the distance to the builder.static WorkOrderDecorationcreate(@NotNull WorkOrderType type, String packName, String path, String translationKey, net.minecraft.core.BlockPos location, com.ldtteam.structurize.api.RotationMirror rotMir, int currentLevel) booleanIs this WorkOrder still valid? If not, it will be deleted.voidExecuted when a work order is added.voidExecuted when a work order is removed.Methods inherited from class com.minecolonies.core.colony.workorders.AbstractWorkOrder
canBeResolved, clearBlueprint, createFromNBT, createWorkOrderView, getAmountOfResources, getBlueprint, getBoundingBox, getClaimedBy, getColony, getCurrentLevel, getDisplayName, getID, getIteratorType, getLocation, getPriority, getRotationMirror, getStage, getStructurePack, getStructurePath, getTargetLevel, getTranslationKey, getWorkOrderType, isClaimed, isCleared, isDirty, isRequested, loadBlueprint, onCompleted, read, resetChange, serializeViewNetworkData, setAmountOfResources, setBlueprint, setClaimedBy, setCleared, setColony, setID, setIteratorType, setPriority, setRequested, setStage, tooFarFromAnyBuilder, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.colony.workorders.IWorkOrder
getFileName
-
Constructor Details
-
WorkOrderDecoration
public WorkOrderDecoration()Unused constructor for reflection.
-
-
Method Details
-
create
public static WorkOrderDecoration create(@NotNull @NotNull WorkOrderType type, String packName, String path, String translationKey, net.minecraft.core.BlockPos location, com.ldtteam.structurize.api.RotationMirror rotMir, int currentLevel) -
canBuild
Checks if a builder may accept this workOrder.- Specified by:
canBuildin interfaceIServerWorkOrder- Specified by:
canBuildin classAbstractWorkOrder- Parameters:
building- which could build it or not- Returns:
- true if he is able to.
-
canBuildIgnoringDistance
public boolean canBuildIgnoringDistance(@NotNull @NotNull IBuilding building, net.minecraft.core.BlockPos position, int level) Checks if a builder may accept this workOrder while ignoring the distance to the builder.- Parameters:
position- position of the builders own hut.level- level of the builders hut.- Returns:
- true if so.
-
isValid
Description copied from class:AbstractWorkOrderIs this WorkOrder still valid? If not, it will be deleted.Suppressing Sonar Rule squid:S1172 This rule does " Unused method parameters should be removed" But in this case extending class may need to use the colony parameter
- Specified by:
isValidin interfaceIServerWorkOrder- Overrides:
isValidin classAbstractWorkOrder- Parameters:
colony- The colony that owns the Work Order- Returns:
- True if the WorkOrder is still valid, or False if it should be deleted
-
onAdded
Description copied from class:AbstractWorkOrderExecuted when a work order is added.Override this when something need to be done when the work order is added
- Specified by:
onAddedin interfaceIServerWorkOrder- Overrides:
onAddedin classAbstractWorkOrder- Parameters:
colony- in which the work order existreadingFromNbt- if being read from NBT.
-
onRemoved
Description copied from class:AbstractWorkOrderExecuted when a work order is removed.Override this when something need to be done when the work order is removed
- Specified by:
onRemovedin interfaceIBuilderWorkOrder- Overrides:
onRemovedin classAbstractWorkOrder- Parameters:
colony- in which the work order exist
-