Class ProduceOreTask

    • Field Detail

      • PROPERTY_TYPENAME

        public static final java.lang.String PROPERTY_TYPENAME
        The type name property.
        See Also:
        Constant Field Values
      • PROPERTY_TARGET

        public static final java.lang.String PROPERTY_TARGET
        The property for the target.
        See Also:
        Constant Field Values
      • PROPERTY_CAPACITY

        public static final java.lang.String PROPERTY_CAPACITY
        The property for the produced ore amount.
        See Also:
        Constant Field Values
      • TIME

        public static final int TIME
        The time required for producing one unit of ore (in millis).
        See Also:
        Constant Field Values
      • time

        protected long time
        The remaining time.
    • Constructor Detail

      • ProduceOreTask

        public ProduceOreTask()
    • Method Detail

      • execute

        public void execute​(IEnvironmentSpace space,
                            ISpaceObject obj,
                            long progress,
                            IClockService clock)
        Executes the task. Handles exceptions. Subclasses should implement doExecute() instead.
        Specified by:
        execute in interface IObjectTask
        Overrides:
        execute in class AbstractTask
        Parameters:
        space - The environment in which the task is executing.
        obj - The object that is executing the task.
        progress - The time that has passed according to the environment executor.
        clock - The clock service.