pluginiPlugin
Configuration

Action Configuration


Structure and Configuration

Supports unlimited nested directories
example.yml
hello.yml
world.yml

Nodes

Ensure that each action ID is a unique identifier.

action:
  # Action ID
  look:
    taskTime: 0
    shouldExecute: |
        false
    startTask: |
        tell execute
    continueExecute: |
        false
    updateTask: |
        tell execute
    resetTask: |
        tell execute

The action configuration script requires the application of Kether.

NodeTypeDefault ValueDescriptionRemarks
taskTimeint0Task durationSpecifies the time for the task to execute, in ticks; 20 ticks equals 1 second.
shouldExecuteKether BooleanCondition required to execute this behavior taskThe result being true will start execution.
startTaskKetherWhat to do when starting execution
continueExecuteKether BooleanCondition required to continue executionIf the result is true, it will execute updateTask, otherwise it will execute resetTask.
updateTaskKetherWhat to executeAfter execution, it will check continueExecute.
resetTaskKetherWhat to executeEnds the current task after execution.

Example

action:
  # Action ID is lookowner
  look_owner:
    # 4 seconds
    taskTime: 80
    # Condition: the distance between the pet and the owner is less than 2.0
    shouldExecute: |
      check distance pet entity to pet owner < 2.0
    # Message when starting to observe
    startTask: |
      tell "The pet is preparing to observe you."
    # If taskTime is greater than 0, the distance between the pet and owner is less than 2.0, and the pet is not being ridden
    continueExecute: |
      all [ check distance pet entity to pet owner < 2.0
      check taskTime > 0
      check pet drive has == false ]
    # The pet looks at the owner
    updateTask: |
      pet look pet owner
      tell "The pet is observing you."
    # Message when observation ends
    resetTask: |
      tell "The pet has finished observing."

Tip

You may have noticed that the Kether statements in the action configuration include taskTime, which is a statement unique to action configuration.

It retrieves the current value of taskTime. The default value of taskTime in Kether is associated with the taskTime in the node, and with each execution of updateTask, the value of taskTime will decrease.

This means that in each tick, when updateTask is executed, taskTime will decrease by one.

On this page