Minecraft

Written by Shubham Gupta

This document outlines the Minecraft commands

TODO -> Update the “/gm” and “/takePDDLMove” descriptions

Basic player movements

  • Look - “/look yawAngle pitchAngle” -> Points the cursor in the pitch and yaw direction indicated

    • yawAngle -> the angle of rotation between -180 and 180 degrees
    • pitchAngle -> the up/down angle between -90 and 90 degrees
    • “/look xCoordinate yCoordinate zCoordinate” -> Points the cursor in the direction of the specified location - xCoordinate -> x-coordinate of location - yCoordinate -> y-coordinate of location - zCoordinate -> z-coordinate of location

    • “/look pitchAngle” -> Points the cursor in the pitch direction indicated while keeping the same yaw - pitchAngle -> the up/down angle between -90 and 90 degrees

    • “/looka direction” -> Points the cursor to the adjacent block in the indicated direction - direction -> one of the 8 compass directions: “n”, “ne”, “e”, “se”, “s”, “sw”, “w”, “nw” - Can also use “/lookadj” and “/lookadjacent”

      • Place Block
    • “/placeBlock” -> Places a cobblestone block at the foot level in the current direction - Turn

    • “/turn direction” -> Turns 90 degrees in the specified direction - direction -> “left” or “right”

      • Select Item in Inventory
    • “/selectItem itemIndex” -> Chooses the item at the given index (starts from 0) as the main item in the player’s hand - itemIndex -> Index of the item desired

Commands to Return Details

  • Take Screenshot - “/takePic” -> Takes a screenshot of the Minecraft game and saves it to the ?screenshots’ folder

  • Get Biome - “/biome” -> Returns the biome in which the player is currently located

  • Get Block - “/testPeek direction” -> Returns the block adjacent to the player in the indicated direction

    • direction -> one of the 8 compass directions: “n”, “ne”, “e”, “se”, “s”, “sw”, “w”, “nw”
    • Can also use “/peek direction”
  • Get blocks/entities in Minecraft frame - “/getInfoNoLook” -> Makes a list of the blocks/entities in the frame using raytracing - “/getInfoWithLook” -> Makes a list of the blocks/entities in the frame by looking at every pixel

  • Get object under cursor - “/getThingNoLook” -> Uses raytracing to return the object under the cursor - “/getThingWithLook” -> Uses the mouseOver object to return object under cursor

  • Simulate video and get objects/entities in video - “/getVidData numIterations” -> Captures frame data, moves 40 degrees, and repeats until full circle is made

    • numIterations -> If greater than 1, the player teleports 10 blocks forward in the x-direction, and repeats the rotations

Create Testing Scenarios/Obstacle Courses

  • Create Obstacle Course Sections - “/makeSection sectionName addGoal” -> Creates the specified obstacle course section with a gold block if desired

    • sectionName -> Letter of section to be created. See below for the types of sections and their associated letters.
    • addGoal -> If this is not null, a gold block is added to the end of the section
  • Create Obstacle Courses - “/makeObstacle numSections sectionName” -> Creates an obstacle course with the indicated number of sections, and if applicable, of only the given section - numSection -> Number of sections to use in the obstacle course - sectionName -> If not null, the course will consist of only this section

  • Create Test Scenarios - “/makeTest testCase” -> Creates the given test scenario

    • testCase -> Name of test case to create. See below for the types of cases and their names

Player Actions

  • Perform Subgoals - “/do subgoalName” -> Accomplishes the given subgoal towards the target if preconditions are met

    • subgoalName -> Name of subgoal. See below for details on the subgoals
  • Take Moves - “/takeExpertMove numIterations” -> Chooses a subgoal appropriate based on the environment and takes the action for the given number of iterations

    • numIterations -> Number of times the expert move should be taken. If “-1”, the player will keep taking the expert move until the target is reached
    • “/takeExpertMoveForHunt” -> Targets the nearest creeper and kills it
    • “/takeExpertMoveForMob” -> Targets any nearest mob entity and kills it
    • “/takeExpertMoveForWood” -> Finds wood and collects it
    • “/takeExpertMoveForBlock” -> Looks for block type that is directly under the cursor and mines it
    • “/takeOrderedMove numIterations” -> Similar to “/takeExpertMove”, the player goes through a preset order of subgoals and selects one that is appropriate - numIterations -> Number of times the ordered move should be taken. If “-1”, the player will keep taking the ordered move until the target is reached
    • “/takePDDLMove”

Miscellaneous

  • Set Targets - “/setTarget zDistance” -> Sets a target location a distance away in the z-direction

    • zDistance -> Amount of blocks away from the player in the z-direction
    • “/setTargetLoc xCoordinate yCoordinate zCoordinate” -> Sets a target location at the specified location - xCoordinate -> x-coordinate of location - yCoordinate -> y-coordinate of location - zCoordinate -> z-coordinate of location
  • Center Player to Block - “/snap” -> Snaps player to center of block it is currently on

  • Goal Manager Commands - “/goalManager”

Subgoals

  • “stepTo” -> Walks forward and jumps if needed
  • “stepAround” -> Walks to the next nearest possible block
  • “stairs” -> Builds a staircase
  • “bridge” -> Builds a bridge
  • “mine” -> Destroys blocks in front of the player
  • “leftStep” -> Walks to the left
  • “rightStep” -> Walks to the right
  • “fowardStep” -> Walks forward (does not jump)
  • “backStep” -> Walks backward

Obstacle Course Section Types

  • Arch (“a”) -> A horizontal beam of cobblestone at the player’s eye level
  • Begin (“b”) -> Creates the starting section without the emerald block
  • Comb (“c”) -> A clay comb of height 3 blocks facing the player
  • Deep Pond (“d”) -> A pond that is 3 blocks deep
  • Empty (“e”) -> Empty section, similar to the “Begin” section
  • Diamond Stack (“f”) -> A stack of two diamond blocks
  • Target (“g”) -> Similar to the “Empty” and “Begin” section
  • Glowstone Stack (“h”) -> A stack of two glowstone blocks
  • Brick Stack (“i”) -> A stack of two brick blocks
  • Lapis Stack (“j”) -> A stack of two lapis blocks
  • Sandstone Stack (“k”) -> A stack of two sandstone blocks
  • Lava (“l”) -> A pool of lava with depth of 1 block
  • Ocelot (“m”) -> Section with an ocelot
  • Sheep (“n”) -> Section with a sheep
  • Obstacle (“o”) -> Section with a wall of depth 3
  • Pond (“p”) -> Pond with depth of 2 blocks
  • Chicken (“q”) -> Section with a chicken
  • Mooshroom (“r”) -> Section with a mooshroom
  • Short Wall (“s”) -> Wall of height 2 spanning the entire width of the course
  • Tall Wall (“t”) -> Wall of height 3 spanning the entire width of the course
  • Tree (“u”) -> A stack of two wood blocks
  • Stairs (“v”) -> Staircase with 3 steps
  • Swamp (“w”) -> A pond with depth of 1 block
  • Pig (“x”) -> Section with a pig

Test Scenarios

  • “simple” -> Creates a pool of lava between the player and a gold block (target)
  • “peek” -> Creates an assortment of blocks around the player’s feet
  • “peeklevel” -> Creates an assortment of blocks around the player
  • “jump” -> Creates a stack of a sandstone block and a gold block (target)
  • “walk” -> Creates an arch between the player and a gold block (target)
  • “mini” -> Creates an arch in front of a pool of lava with the stack of sandstone and gold on the lava, between the player and a gold block (target)
  • “obstacle” -> Creates an obstacle course with 9 sections, a starting emerald block, and an ending gold block (target)
  • “look” -> Creates a wall of emerald, cobblestone, and dirt in front of the player, filling the entire frame