Class WorkOrderPlantationField
java.lang.Object
com.minecolonies.core.colony.workorders.AbstractWorkOrder
com.minecolonies.core.colony.workorders.WorkOrderPlantationField
- All Implemented Interfaces:
IBuilderWorkOrder,IServerWorkOrder,IWorkOrder
A work order that the build can take to build plantation fields.
-
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 TypeMethodDescriptionbooleanWhether the work order can be built or not.booleancanBuildIgnoringDistance(@NotNull IBuilding building, net.minecraft.core.BlockPos position, int level) Check if a citizen may accept this workOrder while ignoring the distance to the build location.static WorkOrderPlantationFieldcreate(@NotNull WorkOrderType type, String packName, String path, String translationKey, net.minecraft.core.BlockPos location, int rotation, boolean mirror, 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, getRotation, getStage, getStructurePack, getStructurePath, getTargetLevel, getTranslationKey, getWorkOrderType, isClaimed, isCleared, isDirty, isMirrored, 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
-
WorkOrderPlantationField
public WorkOrderPlantationField()Unused constructor for reflection.
-
-
Method Details
-
create
public static WorkOrderPlantationField create(@NotNull @NotNull WorkOrderType type, String packName, String path, String translationKey, net.minecraft.core.BlockPos location, int rotation, boolean mirror, int currentLevel) -
canBuild
Description copied from class:AbstractWorkOrderWhether the work order can be built or not.- Specified by:
canBuildin interfaceIServerWorkOrder- Specified by:
canBuildin classAbstractWorkOrder- Parameters:
building- the citizen attempting to perform the work order- Returns:
- true if it can be built
-
canBuildIgnoringDistance
public boolean canBuildIgnoringDistance(@NotNull @NotNull IBuilding building, net.minecraft.core.BlockPos position, int level) Check if a citizen may accept this workOrder while ignoring the distance to the build location.- Parameters:
building- the building that is assigned.position- the position of the citizen's work hut.level- the level of that work hut.- Returns:
- true if the citizen may accept this work order.
-
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
-