Enum Class AgentActionType

java.lang.Object
java.lang.Enum<AgentActionType>
cn.nukkit.network.protocol.types.AgentActionType
All Implemented Interfaces:
Serializable, Comparable<AgentActionType>, Constable

public enum AgentActionType extends Enum<AgentActionType>
Since:
v503

Enum members without a JSON example use the following format:

     {
         "result": true|false
     }
 
  • Enum Constant Details

    • NONE

      public static final AgentActionType NONE
    • ATTACK

      public static final AgentActionType ATTACK
    • COLLECT

      public static final AgentActionType COLLECT
    • DESTROY

      public static final AgentActionType DESTROY
    • DETECT_REDSTONE

      public static final AgentActionType DETECT_REDSTONE
    • DETECT_OBSTACLE

      public static final AgentActionType DETECT_OBSTACLE
    • DROP

      public static final AgentActionType DROP
    • DROP_ALL

      public static final AgentActionType DROP_ALL
    • INSPECT

      public static final AgentActionType INSPECT
      JSON Data:
           {
               "result": {
                   "block": {
                       "id": "dirt",
                       "namespace": "minecraft",
                       "aux": 0
                   }
               }
           }
       
    • INSPECT_DATA

      public static final AgentActionType INSPECT_DATA
      JSON Data:
           {
               "result": {
                   "block": {
                       "aux": 0
                   }
               }
           }
       
    • INSPECT_ITEM_COUNT

      public static final AgentActionType INSPECT_ITEM_COUNT
      JSON Data:
           {
               "result": {
                   "item": {
                       "count": 10
                   }
               }
           }
       
    • INSPECT_ITEM_DETAIL

      public static final AgentActionType INSPECT_ITEM_DETAIL
      Note: If the enchantment level is above 10, the i18n string should not be used.

      JSON Data:

           {
               "result": {
                   "item": {
                       "id": "dirt",
                       "namespace": "minecraft",
                       "aux": 0,
                       "maxStackSize": 64,
                       "stackSize": 1,
                       "freeStackSize": 63,
                       "enchantments: [
                           {
                               "name": "enchantment.knockback enchantment.level.1" | "enchantment.knockback 20",
                               "type": 1,
                               "level": 1
                           }
                       ]
                   }
               }
           }
       
    • INSPECT_ITEM_SPACE

      public static final AgentActionType INSPECT_ITEM_SPACE
      JSON Data:
           {
               "result": {
                   "item": {
                       "maxStackSize": 64,
                       "stackSize": 1,
                       "freeStackSize": 63 // (maxStackSize - stackSize)
                   }
               }
           }
       
    • INTERACT

      public static final AgentActionType INTERACT
    • MOVE

      public static final AgentActionType MOVE
      JSON Data:
           {
               "status": {
                   "statusName": "moving" | "blocked | "reached"
               }
           }
       
    • PLACE_BLOCK

      public static final AgentActionType PLACE_BLOCK
    • TILL

      public static final AgentActionType TILL
    • TRANSFER_ITEM_TO

      public static final AgentActionType TRANSFER_ITEM_TO
    • TURN

      public static final AgentActionType TURN
  • Method Details

    • values

      public static AgentActionType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AgentActionType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null