<commit_before><?xml version="1.0" encoding="UTF-8" ?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://ProjectMalmo.microsoft.com"
           xmlns="http://ProjectMalmo.microsoft.com"
           xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
           elementFormDefault="qualified"
           jaxb:version="2.1"
           version="0.14">

  <xs:include schemaLocation="Types.xsd" />

  <xs:complexType name="Pos">
    <xs:annotation>
      <xs:documentation>
        An absolute position in the 3D Minecraft world.
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="x" type="xs:decimal" use="required" />
    <xs:attribute name="y" type="xs:decimal" use="required" />
    <xs:attribute name="z" type="xs:decimal" use="required" />
  </xs:complexType>

  <xs:complexType name="PosAndDirection">
    <xs:annotation>
      <xs:documentation>
        An absolute position in the 3D Minecraft world that includes yaw and pitch.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Pos">
        <xs:attribute name="yaw" use="optional" default="0">
          <xs:annotation>
            <xs:documentation>
              Defaults to facing South (0). North is 180.
            </xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:restriction base="xs:decimal">
              <xs:minInclusive value="0"/>
              <xs:maxInclusive value="360"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="pitch" use="optional" default="0">
          <xs:annotation>
            <xs:documentation>
              Defaults to looking straight ahead (0). +90 = look down. -90 = look up.
            </xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:restriction base="xs:decimal">
              <xs:minInclusive value="-90"/>
              <xs:maxInclusive value="90"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!--=============================================================================================================-->
  <!--=========================================== SERVER-SIDE HANDLERS ============================================-->
  <!--=============================================================================================================-->

  <!--============================================= WORLD GENERATORS ==============================================-->

  <xs:element name="FlatWorldGenerator">
    <xs:annotation>
      <xs:documentation>
        Generates a superflat world with a specified preset string - see e.g. [[http://www.minecraft101.net/superflat/]]
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="generatorString" use="optional" type="xs:string" default="3;7,2*3,2;1;village">
        <xs:annotation>
          <xs:documentation>
            The superflat customization preset string.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="forceReset" use="optional" type="xs:boolean" default="false">
        <xs:annotation>
          <xs:documentation>
            Set this to true to force the world to be reloaded, otherwise the current world will be used (provided it matches the requested generator string).
            Force reloading is slow, but will guarantee that no world changes will carry over between missions.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="seed" use="optional" type="xs:string" default="">
        <xs:annotation>
          <xs:documentation>
            The world seed - leave blank (default) to get a random world.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

  <xs:element name="DefaultWorldGenerator">
    <xs:annotation>
      <xs:documentation>
        Generates the default terrain.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="seed" use="optional" type="xs:string" default="">
        <xs:annotation>
          <xs:documentation>
            The world seed - leave blank (default) to get a random world.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="forceReset" use="optional" type="xs:boolean" default="false">
        <xs:annotation>
          <xs:documentation>
            Set this to true to force the world to be reloaded, otherwise the current world will be used (provided it matches the requested seed).
            Force reloading is slow, but will guarantee that no world changes will carry over between missions.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

  <xs:element name="FileWorldGenerator">
    <xs:annotation>
      <xs:documentation>
        Loads a saved world from disk. You can find the saved worlds in "{{{Minecraft\run\saves}}}". Use the full path to one of those folders.
        
        If Minecraft is running on a different machine then copy the folder to a readable network location and update the path accordingly. Example:
        
        {{{&lt;FileWorldGenerator src=&quot;\\\\machine-id\\shared\\ProjectMalmo\\saved_maps\\arena&quot; /&gt;}}}
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="src" use="required" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>
            The path to the saved world folder.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="forceReset" use="optional" type="xs:boolean" default="false">
        <xs:annotation>
          <xs:documentation>
            Set this to true to force the world to be reloaded, otherwise the current world will be used (provided it matches the requested source filename).
            Force reloading is slow, but will guarantee that no world changes will carry over between missions.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

  <!--============================================= WORLD DECORATORS ==============================================-->

  <xs:simpleType name="BlockList">
    <xs:list itemType="BlockType"/>
  </xs:simpleType>

  <xs:simpleType name="ItemList">
    <xs:list itemType="ItemType"/>
  </xs:simpleType>

  <xs:simpleType name="ColourList">
    <xs:list itemType="Colour"/>
  </xs:simpleType>

  <xs:simpleType name="VariantList">
    <xs:list itemType="BlockVariant"/>
  </xs:simpleType>

  <xs:complexType name="MazeBlock">
    <xs:attribute name="type" use="optional" type="BlockList" />
    <xs:attribute name="variant" use="optional" type="VariantList" />
    <xs:attribute name="colour" use="optional" type="ColourList" />
    <xs:attribute name="height" use="optional" type="xs:int" default="1" />
    <xs:attribute name="heightVariance" use="optional" type="xs:int" default="0" />
  </xs:complexType>

  <xs:complexType name="MazeTerminus">
    <xs:complexContent>
      <xs:extension base="MazeBlock">
        <xs:attribute name="fixedToEdge" use="optional" type="xs:boolean" default="false" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="SnakeBlock">
    <xs:attribute name="type" use="optional" type="BlockList" />
    <xs:attribute name="variant" use="optional" type="VariantList" />
    <xs:attribute name="colour" use="optional" type="ColourList" />
    <xs:attribute name="lifetime" use="optional" type="xs:int" default="1" />
    <xs:attribute name="lifetimeVariance" use="optional" type="xs:int" default="0" />
  </xs:complexType>

  <xs:element name="SnakeDecorator">
    <xs:annotation>
      <xs:documentation>
        Adds a snake made of blocks, that grows at one end and shrinks at the other.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:all>
        <xs:element name="Seed">
          <xs:annotation>
            <xs:documentation>
              The master seed for the random number generator used to make the snake.
            </xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:annotation>
              <xs:documentation>
                Either an integer number, or the string "random".
              </xs:documentation>
            </xs:annotation>
            <xs:restriction base="xs:string">
              <xs:pattern value="random|[0-9]+"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element name="MaterialSeed" minOccurs="0">
          <xs:annotation>
            <xs:documentation>
              Optional seed for determining block types.
            </xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:annotation>
              <xs:documentation>
                Either an integer number, or the string "random".
              </xs:documentation>
            </xs:annotation>
            <xs:restriction base="xs:string">
              <xs:pattern value="random|[0-9]+"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element name="FreshBlock" type="SnakeBlock" />
        <xs:element name="StaleBlock" type="SnakeBlock" />
        <xs:element name="GapProbability">
          <xs:complexType>
            <xs:simpleContent>
              <xs:extension base="xs:decimal">
                <xs:attribute name="variance" type="xs:decimal" use="optional" default="0"/>
              </xs:extension>
            </xs:simpleContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="StairsProbability">
          <xs:complexType>
            <xs:simpleContent>
              <xs:extension base="xs:decimal">
                <xs:attribute name="variance" type="xs:decimal" use="optional" default="0"/>
              </xs:extension>
            </xs:simpleContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="TurnProbability">
          <xs:complexType>
            <xs:simpleContent>
              <xs:extension base="xs:decimal">
                <xs:attribute name="variance" type="xs:decimal" use="optional" default="0"/>
              </xs:extension>
            </xs:simpleContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="SizeAndPosition">
          <xs:complexType>
            <xs:attribute name="xOrigin" type="xs:int" default="0"/>
            <xs:attribute name="yOrigin" type="xs:int" default="55"/>
            <xs:attribute name="zOrigin" type="xs:int" default="0"/>
            <xs:attribute name="yMin" type="xs:int" default="32"/>
            <xs:attribute name="yMax" type="xs:int" default="250"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="SpeedInTicks" type="xs:int" default="6"/>
        <xs:element name="MaxLength" type="xs:int" default="30"/>
        <xs:element name="MaxStairLength" type="xs:int" default="20"/>
      </xs:all>
    </xs:complexType>
  </xs:element>

  <xs:element name="MazeDecorator">
    <xs:annotation>
      <xs:documentation>
        Adds a maze into the world.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:all>
        <xs:element name="Seed">
          <xs:annotation>
            <xs:documentation>
              The master seed for the random number generator used to make the maze.
            </xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:annotation>
              <xs:documentation>
                Either an integer number, or the string "random".
              </xs:documentation>
            </xs:annotation>
            <xs:restriction base="xs:string">
              <xs:pattern value="random|[0-9]+"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element name="MaterialSeed" minOccurs="0">
          <xs:annotation>
            <xs:documentation>
              Seed for the random number generator for determining block types - omit to allow master seed to control block types.
            </xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:annotation>
              <xs:documentation>
                Either an integer number, or the string "random".
              </xs:documentation>
            </xs:annotation>
            <xs:restriction base="xs:string">
              <xs:pattern value="random|[0-9]+"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element name="AllowDiagonalMovement" type="xs:boolean" default="false"/>
        <xs:element name="SizeAndPosition">
          <xs:complexType>
            <xs:attribute name="width" type="xs:int" default="10"/>
            <xs:attribute name="length" type="xs:int" default="10"/>
            <xs:attribute name="height" type="xs:int" default="100"/>
            <xs:attribute name="scale" type="xs:int" default="1"/>
            <xs:attribute name="xOrigin" type="xs:int" default="0"/>
            <xs:attribute name="yOrigin" type="xs:int" default="55"/>
            <xs:attribute name="zOrigin" type="xs:int" default="0"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="StartBlock" type="MazeTerminus" />
        <xs:element name="EndBlock" type="MazeTerminus" />
        <xs:element name="PathBlock" type="MazeBlock" />
        <xs:element name="FloorBlock" type="MazeBlock" />
        <xs:element name="GapBlock" type="MazeBlock" />
        <xs:element name="OptimalPathBlock" type="MazeBlock" minOccurs="0">
          <xs:annotation>
            <xs:documentation>
              Omit this element if you want the optimal path to be unmarked.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="SubgoalBlock" type="MazeBlock" minOccurs="0">
          <xs:annotation>
            <xs:documentation>
              Omit this element if you want the subgoal points to be unmarked.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="Waypoints" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:choice>
              <xs:element name="WaypointBlock" type="MazeBlock" />
              <xs:element name="WaypointItem" type="ItemList" />
            </xs:choice>
            <xs:attribute name="quantity" type="xs:int" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="GapProbability">
          <xs:complexType>
            <xs:simpleContent>
              <xs:extension base="xs:decimal">
                <xs:attribute name="variance" type="xs:decimal" use="optional" default="0"/>
              </xs:extension>
            </xs:simpleContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="AddQuitProducer" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:attribute name="description" type="xs:string" use="optional" default=""/>
          </xs:complexType>
        </xs:element>
        <xs:element name="AddNavigationObservations" minOccurs="0" maxOccurs="1">
          <xs:complexType/>
        </xs:element>
      </xs:all>
    </xs:complexType>
  </xs:element>

  <xs:complexType name="DrawObjectType">
    <xs:annotation>
      <xs:documentation>
        Base class for all draw objects.
      </xs:documentation>
    </xs:annotation>
  </xs:complexType>

  <xs:complexType name="DrawBlockBasedObjectType">
    <xs:annotation>
      <xs:documentation>
        Base class for all block-based draw objects.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DrawObjectType">
        <xs:attribute name="type" type="BlockType" use="required" />
        <xs:attribute name="variant" type="BlockVariant" use="optional" />
        <xs:attribute name="colour" type="Colour" use="optional" />
        <xs:attribute name="face" type="Facing" use="optional" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:element name="DrawingDecorator">
    <xs:annotation>
      <xs:documentation>
        Draws structures into the world.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="DrawObjectType" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:complexType name="DrawBlock">
    <xs:annotation>
      <xs:documentation>
        Specify a block by location and type.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DrawBlockBasedObjectType">
        <xs:attribute name="x" type="xs:int" use="required" />
        <xs:attribute name="y" type="xs:int" use="required" />
        <xs:attribute name="z" type="xs:int" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="DrawItem">
    <xs:annotation>
      <xs:documentation>
        Specify an item by location and type.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DrawObjectType">
        <xs:attribute name="x" type="xs:int" use="required" />
        <xs:attribute name="y" type="xs:int" use="required" />
        <xs:attribute name="z" type="xs:int" use="required" />
        <xs:attribute name="type" type="ItemType" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="DrawCuboid">
    <xs:annotation>
      <xs:documentation>
        Specify a filled cuboid by inclusive coordinates and block type.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DrawBlockBasedObjectType">
        <xs:attribute name="x1" type="xs:int" use="required" />
        <xs:attribute name="y1" type="xs:int" use="required" />
        <xs:attribute name="z1" type="xs:int" use="required" />
        <xs:attribute name="x2" type="xs:int" use="required" />
        <xs:attribute name="y2" type="xs:int" use="required" />
        <xs:attribute name="z2" type="xs:int" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="DrawSphere">
    <xs:annotation>
      <xs:documentation>
        Specify a filled sphere by centre coordinates and inclusive radius.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DrawBlockBasedObjectType">
        <xs:attribute name="x" type="xs:int" use="required" />
        <xs:attribute name="y" type="xs:int" use="required" />
        <xs:attribute name="z" type="xs:int" use="required" />
        <xs:attribute name="radius" type="xs:int" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="DrawLine">
    <xs:annotation>
      <xs:documentation>
        Specify a line by start and end coordinates and thickness.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DrawBlockBasedObjectType">
        <xs:attribute name="x1" type="xs:int" use="required" />
        <xs:attribute name="y1" type="xs:int" use="required" />
        <xs:attribute name="z1" type="xs:int" use="required" />
        <xs:attribute name="x2" type="xs:int" use="required" />
        <xs:attribute name="y2" type="xs:int" use="required" />
        <xs:attribute name="z2" type="xs:int" use="required" />
        <xs:attribute name="steptype" type="BlockType" use="optional" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:element name="DrawObjectType" type="DrawObjectType"/>
  <xs:element name="DrawItem" type="DrawItem" substitutionGroup="DrawObjectType"/>
  <xs:element name="DrawLine" type="DrawLine" substitutionGroup="DrawObjectType"/>
  <xs:element name="DrawSphere" type="DrawSphere" substitutionGroup="DrawObjectType"/>
  <xs:element name="DrawBlock" type="DrawBlock" substitutionGroup="DrawObjectType"/>
  <xs:element name="DrawCuboid" type="DrawCuboid" substitutionGroup="DrawObjectType"/>

  <xs:element name="ClassroomDecorator">
    <xs:annotation>
      <xs:documentation>
        Adds a series of joined rooms into the world.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice>
        <xs:element name="complexity">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="building" type="ZeroToOne" />
              <xs:element name="path" type="ZeroToOne" />
              <xs:element name="division" type="ZeroToOne" />
              <xs:element name="obstacle" type="ZeroToOne" />
              <xs:element name="hint" type="ZeroToOne" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="specification">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="width" type="BuildingSize" />
              <xs:element name="height" type="BuildingSize" />
              <xs:element name="length" type="BuildingSize" />
              <xs:element name="pathLength" type="NonNegative" />
              <xs:element name="divisions">
                <xs:complexType>
                  <xs:all>
                    <xs:element name="southNorth" type="NonNegative" />
                    <xs:element name="eastWest" type="NonNegative" />
                    <xs:element name="aboveBelow" type="NonNegative" />
                  </xs:all>
                </xs:complexType>
              </xs:element>
              <xs:element name="horizontalObstacles" type="HorizontalObstacles" />
              <xs:element name="verticalObstacles" type="VerticalObstacles" />
              <xs:element name="hintLikelihood" type="ZeroToOne" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
      <xs:attribute name="seed" type="xs:string" use="optional" />
      <xs:attribute name="palette" type="PaletteEnum" use="optional" />
    </xs:complexType>
  </xs:element>

  <xs:simpleType name="PaletteEnum">
    <xs:restriction base="xs:string">
      <xs:enumeration value="default"/>
      <xs:enumeration value="random"/>
      <xs:enumeration value="dungeon"/>
      <xs:enumeration value="pyramid"/>
      <xs:enumeration value="igloo"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="HorizontalObstacles">
    <xs:all>
      <xs:element name="gap" type="NonNegative" />
      <xs:element name="bridge" type="NonNegative" />
      <xs:element name="door" type="NonNegative" />
      <xs:element name="puzzle" type="NonNegative" />
      <xs:element name="jump" type="NonNegative" />
    </xs:all>
  </xs:complexType>

  <xs:complexType name="VerticalObstacles">
    <xs:all>
      <xs:element name="stairs" type="NonNegative" />
      <xs:element name="ladder" type="NonNegative" />
      <xs:element name="jump" type="NonNegative" />
    </xs:all>
  </xs:complexType>

  <xs:simpleType name="BuildingSize">
    <xs:restriction base="xs:int">
      <xs:minInclusive value="7" />
      <xs:maxInclusive value="50" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ZeroToOne">
    <xs:restriction base="xs:double">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="NonNegative">
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>

  <!--============================================== QUIT PRODUCERS ===============================================-->

  <xs:element name="ServerQuitFromTimeUp">
    <xs:annotation>
      <xs:documentation>
        Specifies a time limit that applies to all agents.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="timeLimitMs" type="xs:decimal" use="required" />
      <xs:attribute name="description" type="xs:string" use="optional" default="" />
    </xs:complexType>
  </xs:element>

  <xs:element name="ServerQuitWhenAnyAgentFinishes">
    <xs:annotation>
      <xs:documentation>
        Specifies that the mission ends when any of the agents finish.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="description" type="xs:string" use="optional" default="" />
    </xs:complexType>
  </xs:element>

  <!--=============================================================================================================-->
  <!--=========================================== CLIENT-SIDE HANDLERS ============================================-->
  <!--=============================================================================================================-->

  <!--============================================== VIDEO PRODUCERS ==============================================-->
  
  <xs:element name="VideoProducer">
    <xs:annotation>
      <xs:documentation>
        Requests that video frames be sent.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Width" type="xs:int" />
        <xs:element name="Height" type="xs:int" />
        <xs:element name="DepthScaling" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:attribute name="min" default="0">
              <xs:simpleType>
                <xs:restriction base="xs:decimal">
                  <xs:minInclusive value="0"/>
                  <xs:maxInclusive value="1"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="max" default="1">
              <xs:simpleType>
                <xs:restriction base="xs:decimal">
                  <xs:minInclusive value="0"/>
                  <xs:maxInclusive value="1"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="autoscale" type="xs:boolean" default="true">
              <xs:annotation>
                <xs:documentation>
                  Set to false to specify the min and max depths manually. Default is true, where uses the min and max depths in the scene.
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="want_depth" type="xs:boolean" default="false">
        <xs:annotation>
          <xs:documentation>
            If true, returns depth in the fourth channel as RGBDRGBD.... Else as RGBRGB...
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="viewpoint" default="0">
        <xs:annotation>
          <xs:documentation>
            Sets the camera viewpoint. 0 = first-person, 1 = behind, 2 = facing.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:int">
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="2"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

  <!--============================================== AUDIO PRODUCERS ==============================================-->

  <!--============================================= COMMAND HANDLERS ==============================================-->

  <!-- Command lists -->

  <xs:simpleType name="ContinuousMovementCommand">
    <xs:annotation>
      <xs:documentation>
        Commands for smooth movement. Some examples:
      
        "{{{move 0.5}}}" - start moving forward at 50% of the normal walking speed (-ve = backward, +ve = forward).
        
        "{{{strafe -1}}}" - start moving left at 100% of the normal walking speed (-ve = left, +ve = right).
        
        "{{{pitch 0.1}}}" - start tilting the agent's head down at 10% of the maximum speed (-ve = up, +ve = down). The maximum speed is set by {{{turnSpeedDegs}}} in {{{ContinuousMovementCommands}}}. 
        
        "{{{turn 0.1}}}" - start turning right at 10% of the maximum speed (-ve = anti-clockwise/left, +ve = clockwise/right). The maximum speed is set by {{{turnSpeedDegs}}} in {{{ContinuousMovementCommands}}}. 
        
        "{{{jump 1}}}" - start jumping (1 = start, 0 = stop).
        
        "{{{crouch 1}}}" - start crouching (1 = start, 0 = stop).
        
        "{{{attack 1}}}" - start attacking (1 = start, 0 = stop). The 'attack' command is for destroying blocks and attacking mobs.
        
        "{{{use 1}}}" - start 'use'ing (1 = start, 0 = stop). The 'use' command is for placing blocks and for other things too.        
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="move" />
      <xs:enumeration value="strafe" />
      <xs:enumeration value="pitch" />
      <xs:enumeration value="turn" />
      <xs:enumeration value="jump" />
      <xs:enumeration value="crouch" />
      <xs:enumeration value="attack" />
      <xs:enumeration value="use" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AbsoluteMovementCommand">
    <xs:annotation>
      <xs:documentation>
        Commands to set position and orientation directly. Some examples:
      
        "{{{tp 23.5 1 -34.5}}}" - teleport the agent to the absolute position x y z (space delimited).
        
        "{{{tpx 230}}}" - set the agent's x coordinate, without altering the y and z.
        
        "{{{tpy 103.2}}}" - set the agent's y coordinate, without altering the x and z.
        
        "{{{tpz -32.5}}}" - set the agent's z coordinate, without altering the x and y.
        
        "{{{setYaw 30}}}" - set the agent's body orientation to be 30 degrees clockwise from south.
        
        "{{{setPitch 20}}}" - set the agent's body orientation to be 20 degrees down from horizontal.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="tpx"/>
      <xs:enumeration value="tpy"/>
      <xs:enumeration value="tpz"/>
      <xs:enumeration value="tp"/>
      <xs:enumeration value="setYaw" />
      <xs:enumeration value="setPitch" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DiscreteMovementCommand">
    <xs:annotation>
      <xs:documentation>
        Commands for moving and turning in discrete increments. Some examples:
      
        "{{{move 1}}}" - move the agent one block forwards (1 = forwards, -1 = backwards).
        
        "{{{turn 1}}}" - rotate the agent 90 degrees right (1 = right, -1 = left).
        
        "{{{movenorth 1}}}" - move the agent one block north.
        
        "{{{moveeast 1}}}" - move the agent one block east.
        
        "{{{movesouth 1}}}" - move the agent one block south.
        
        "{{{movewest 1}}}" - move the agent one block west.
        
        "{{{jump 1}}}" - move the agent one block up.
        
        "{{{look 1}}}" - look down by 45 degrees (-ve = up, +ve = down).
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="move" />
      <xs:enumeration value="turn" />
      <xs:enumeration value="movenorth" />
      <xs:enumeration value="moveeast" />
      <xs:enumeration value="movesouth" />
      <xs:enumeration value="movewest" />
      <xs:enumeration value="jump" />
      <xs:enumeration value="look" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="InventoryCommand">
    <xs:annotation>
      <xs:documentation>
        Commands for changing the contents of the inventory and hotbar. Some examples:
      
        "{{{selectInventoryItem 13}}}" - pick up the item that is in slot 13 in the agent's inventory.
        
        "{{{dropInventoryItem 14}}}" - put the item that is currently picked-up into slot 14.
        
        "{{{discardCurrentItem 15}}}" - discards the item that is in slot 15 in the agent's inventory.
        
        "{{{hotbar.1}}}" - select hotbar slot 1 as the currently-held tool. This affects the attack and use commands - e.g. if the agent does 'use' while holding
        a block item it will place the block into the world.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="selectInventoryItem" />
      <xs:enumeration value="dropInventoryItem" />
      <xs:enumeration value="discardCurrentItem" />
      <xs:enumeration value="hotbar.1" />
      <xs:enumeration value="hotbar.2" />
      <xs:enumeration value="hotbar.3" />
      <xs:enumeration value="hotbar.4" />
      <xs:enumeration value="hotbar.5" />
      <xs:enumeration value="hotbar.6" />
      <xs:enumeration value="hotbar.7" />
      <xs:enumeration value="hotbar.8" />
      <xs:enumeration value="hotbar.9" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ChatCommand">
    <xs:annotation>
      <xs:documentation>
        A command for broadcasting text messages to the other players. An example:
      
        "{{{chat I have found diamonds!}}}" - broadcasts the string "{{{I have found diamonds!}}}".
        
        Chat messages from other players can be observed using {{{ObservationFromChat}}}.<commit_msg>Fix: corrected the effect of the inventory commands.<commit_after><?xml version="1.0" encoding="UTF-8" ?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://ProjectMalmo.microsoft.com"
           xmlns="http://ProjectMalmo.microsoft.com"
           xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
           elementFormDefault="qualified"
           jaxb:version="2.1"
           version="0.14">

  <xs:include schemaLocation="Types.xsd" />

  <xs:complexType name="Pos">
    <xs:annotation>
      <xs:documentation>
        An absolute position in the 3D Minecraft world.
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="x" type="xs:decimal" use="required" />
    <xs:attribute name="y" type="xs:decimal" use="required" />
    <xs:attribute name="z" type="xs:decimal" use="required" />
  </xs:complexType>

  <xs:complexType name="PosAndDirection">
    <xs:annotation>
      <xs:documentation>
        An absolute position in the 3D Minecraft world that includes yaw and pitch.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Pos">
        <xs:attribute name="yaw" use="optional" default="0">
          <xs:annotation>
            <xs:documentation>
              Defaults to facing South (0). North is 180.
            </xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:restriction base="xs:decimal">
              <xs:minInclusive value="0"/>
              <xs:maxInclusive value="360"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="pitch" use="optional" default="0">
          <xs:annotation>
            <xs:documentation>
              Defaults to looking straight ahead (0). +90 = look down. -90 = look up.
            </xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:restriction base="xs:decimal">
              <xs:minInclusive value="-90"/>
              <xs:maxInclusive value="90"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!--=============================================================================================================-->
  <!--=========================================== SERVER-SIDE HANDLERS ============================================-->
  <!--=============================================================================================================-->

  <!--============================================= WORLD GENERATORS ==============================================-->

  <xs:element name="FlatWorldGenerator">
    <xs:annotation>
      <xs:documentation>
        Generates a superflat world with a specified preset string - see e.g. [[http://www.minecraft101.net/superflat/]]
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="generatorString" use="optional" type="xs:string" default="3;7,2*3,2;1;village">
        <xs:annotation>
          <xs:documentation>
            The superflat customization preset string.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="forceReset" use="optional" type="xs:boolean" default="false">
        <xs:annotation>
          <xs:documentation>
            Set this to true to force the world to be reloaded, otherwise the current world will be used (provided it matches the requested generator string).
            Force reloading is slow, but will guarantee that no world changes will carry over between missions.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="seed" use="optional" type="xs:string" default="">
        <xs:annotation>
          <xs:documentation>
            The world seed - leave blank (default) to get a random world.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

  <xs:element name="DefaultWorldGenerator">
    <xs:annotation>
      <xs:documentation>
        Generates the default terrain.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="seed" use="optional" type="xs:string" default="">
        <xs:annotation>
          <xs:documentation>
            The world seed - leave blank (default) to get a random world.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="forceReset" use="optional" type="xs:boolean" default="false">
        <xs:annotation>
          <xs:documentation>
            Set this to true to force the world to be reloaded, otherwise the current world will be used (provided it matches the requested seed).
            Force reloading is slow, but will guarantee that no world changes will carry over between missions.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

  <xs:element name="FileWorldGenerator">
    <xs:annotation>
      <xs:documentation>
        Loads a saved world from disk. You can find the saved worlds in "{{{Minecraft\run\saves}}}". Use the full path to one of those folders.
        
        If Minecraft is running on a different machine then copy the folder to a readable network location and update the path accordingly. Example:
        
        {{{&lt;FileWorldGenerator src=&quot;\\\\machine-id\\shared\\ProjectMalmo\\saved_maps\\arena&quot; /&gt;}}}
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="src" use="required" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>
            The path to the saved world folder.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="forceReset" use="optional" type="xs:boolean" default="false">
        <xs:annotation>
          <xs:documentation>
            Set this to true to force the world to be reloaded, otherwise the current world will be used (provided it matches the requested source filename).
            Force reloading is slow, but will guarantee that no world changes will carry over between missions.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

  <!--============================================= WORLD DECORATORS ==============================================-->

  <xs:simpleType name="BlockList">
    <xs:list itemType="BlockType"/>
  </xs:simpleType>

  <xs:simpleType name="ItemList">
    <xs:list itemType="ItemType"/>
  </xs:simpleType>

  <xs:simpleType name="ColourList">
    <xs:list itemType="Colour"/>
  </xs:simpleType>

  <xs:simpleType name="VariantList">
    <xs:list itemType="BlockVariant"/>
  </xs:simpleType>

  <xs:complexType name="MazeBlock">
    <xs:attribute name="type" use="optional" type="BlockList" />
    <xs:attribute name="variant" use="optional" type="VariantList" />
    <xs:attribute name="colour" use="optional" type="ColourList" />
    <xs:attribute name="height" use="optional" type="xs:int" default="1" />
    <xs:attribute name="heightVariance" use="optional" type="xs:int" default="0" />
  </xs:complexType>

  <xs:complexType name="MazeTerminus">
    <xs:complexContent>
      <xs:extension base="MazeBlock">
        <xs:attribute name="fixedToEdge" use="optional" type="xs:boolean" default="false" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="SnakeBlock">
    <xs:attribute name="type" use="optional" type="BlockList" />
    <xs:attribute name="variant" use="optional" type="VariantList" />
    <xs:attribute name="colour" use="optional" type="ColourList" />
    <xs:attribute name="lifetime" use="optional" type="xs:int" default="1" />
    <xs:attribute name="lifetimeVariance" use="optional" type="xs:int" default="0" />
  </xs:complexType>

  <xs:element name="SnakeDecorator">
    <xs:annotation>
      <xs:documentation>
        Adds a snake made of blocks, that grows at one end and shrinks at the other.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:all>
        <xs:element name="Seed">
          <xs:annotation>
            <xs:documentation>
              The master seed for the random number generator used to make the snake.
            </xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:annotation>
              <xs:documentation>
                Either an integer number, or the string "random".
              </xs:documentation>
            </xs:annotation>
            <xs:restriction base="xs:string">
              <xs:pattern value="random|[0-9]+"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element name="MaterialSeed" minOccurs="0">
          <xs:annotation>
            <xs:documentation>
              Optional seed for determining block types.
            </xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:annotation>
              <xs:documentation>
                Either an integer number, or the string "random".
              </xs:documentation>
            </xs:annotation>
            <xs:restriction base="xs:string">
              <xs:pattern value="random|[0-9]+"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element name="FreshBlock" type="SnakeBlock" />
        <xs:element name="StaleBlock" type="SnakeBlock" />
        <xs:element name="GapProbability">
          <xs:complexType>
            <xs:simpleContent>
              <xs:extension base="xs:decimal">
                <xs:attribute name="variance" type="xs:decimal" use="optional" default="0"/>
              </xs:extension>
            </xs:simpleContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="StairsProbability">
          <xs:complexType>
            <xs:simpleContent>
              <xs:extension base="xs:decimal">
                <xs:attribute name="variance" type="xs:decimal" use="optional" default="0"/>
              </xs:extension>
            </xs:simpleContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="TurnProbability">
          <xs:complexType>
            <xs:simpleContent>
              <xs:extension base="xs:decimal">
                <xs:attribute name="variance" type="xs:decimal" use="optional" default="0"/>
              </xs:extension>
            </xs:simpleContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="SizeAndPosition">
          <xs:complexType>
            <xs:attribute name="xOrigin" type="xs:int" default="0"/>
            <xs:attribute name="yOrigin" type="xs:int" default="55"/>
            <xs:attribute name="zOrigin" type="xs:int" default="0"/>
            <xs:attribute name="yMin" type="xs:int" default="32"/>
            <xs:attribute name="yMax" type="xs:int" default="250"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="SpeedInTicks" type="xs:int" default="6"/>
        <xs:element name="MaxLength" type="xs:int" default="30"/>
        <xs:element name="MaxStairLength" type="xs:int" default="20"/>
      </xs:all>
    </xs:complexType>
  </xs:element>

  <xs:element name="MazeDecorator">
    <xs:annotation>
      <xs:documentation>
        Adds a maze into the world.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:all>
        <xs:element name="Seed">
          <xs:annotation>
            <xs:documentation>
              The master seed for the random number generator used to make the maze.
            </xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:annotation>
              <xs:documentation>
                Either an integer number, or the string "random".
              </xs:documentation>
            </xs:annotation>
            <xs:restriction base="xs:string">
              <xs:pattern value="random|[0-9]+"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element name="MaterialSeed" minOccurs="0">
          <xs:annotation>
            <xs:documentation>
              Seed for the random number generator for determining block types - omit to allow master seed to control block types.
            </xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:annotation>
              <xs:documentation>
                Either an integer number, or the string "random".
              </xs:documentation>
            </xs:annotation>
            <xs:restriction base="xs:string">
              <xs:pattern value="random|[0-9]+"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element name="AllowDiagonalMovement" type="xs:boolean" default="false"/>
        <xs:element name="SizeAndPosition">
          <xs:complexType>
            <xs:attribute name="width" type="xs:int" default="10"/>
            <xs:attribute name="length" type="xs:int" default="10"/>
            <xs:attribute name="height" type="xs:int" default="100"/>
            <xs:attribute name="scale" type="xs:int" default="1"/>
            <xs:attribute name="xOrigin" type="xs:int" default="0"/>
            <xs:attribute name="yOrigin" type="xs:int" default="55"/>
            <xs:attribute name="zOrigin" type="xs:int" default="0"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="StartBlock" type="MazeTerminus" />
        <xs:element name="EndBlock" type="MazeTerminus" />
        <xs:element name="PathBlock" type="MazeBlock" />
        <xs:element name="FloorBlock" type="MazeBlock" />
        <xs:element name="GapBlock" type="MazeBlock" />
        <xs:element name="OptimalPathBlock" type="MazeBlock" minOccurs="0">
          <xs:annotation>
            <xs:documentation>
              Omit this element if you want the optimal path to be unmarked.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="SubgoalBlock" type="MazeBlock" minOccurs="0">
          <xs:annotation>
            <xs:documentation>
              Omit this element if you want the subgoal points to be unmarked.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="Waypoints" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:choice>
              <xs:element name="WaypointBlock" type="MazeBlock" />
              <xs:element name="WaypointItem" type="ItemList" />
            </xs:choice>
            <xs:attribute name="quantity" type="xs:int" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="GapProbability">
          <xs:complexType>
            <xs:simpleContent>
              <xs:extension base="xs:decimal">
                <xs:attribute name="variance" type="xs:decimal" use="optional" default="0"/>
              </xs:extension>
            </xs:simpleContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="AddQuitProducer" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:attribute name="description" type="xs:string" use="optional" default=""/>
          </xs:complexType>
        </xs:element>
        <xs:element name="AddNavigationObservations" minOccurs="0" maxOccurs="1">
          <xs:complexType/>
        </xs:element>
      </xs:all>
    </xs:complexType>
  </xs:element>

  <xs:complexType name="DrawObjectType">
    <xs:annotation>
      <xs:documentation>
        Base class for all draw objects.
      </xs:documentation>
    </xs:annotation>
  </xs:complexType>

  <xs:complexType name="DrawBlockBasedObjectType">
    <xs:annotation>
      <xs:documentation>
        Base class for all block-based draw objects.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DrawObjectType">
        <xs:attribute name="type" type="BlockType" use="required" />
        <xs:attribute name="variant" type="BlockVariant" use="optional" />
        <xs:attribute name="colour" type="Colour" use="optional" />
        <xs:attribute name="face" type="Facing" use="optional" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:element name="DrawingDecorator">
    <xs:annotation>
      <xs:documentation>
        Draws structures into the world.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="DrawObjectType" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:complexType name="DrawBlock">
    <xs:annotation>
      <xs:documentation>
        Specify a block by location and type.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DrawBlockBasedObjectType">
        <xs:attribute name="x" type="xs:int" use="required" />
        <xs:attribute name="y" type="xs:int" use="required" />
        <xs:attribute name="z" type="xs:int" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="DrawItem">
    <xs:annotation>
      <xs:documentation>
        Specify an item by location and type.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DrawObjectType">
        <xs:attribute name="x" type="xs:int" use="required" />
        <xs:attribute name="y" type="xs:int" use="required" />
        <xs:attribute name="z" type="xs:int" use="required" />
        <xs:attribute name="type" type="ItemType" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="DrawCuboid">
    <xs:annotation>
      <xs:documentation>
        Specify a filled cuboid by inclusive coordinates and block type.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DrawBlockBasedObjectType">
        <xs:attribute name="x1" type="xs:int" use="required" />
        <xs:attribute name="y1" type="xs:int" use="required" />
        <xs:attribute name="z1" type="xs:int" use="required" />
        <xs:attribute name="x2" type="xs:int" use="required" />
        <xs:attribute name="y2" type="xs:int" use="required" />
        <xs:attribute name="z2" type="xs:int" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="DrawSphere">
    <xs:annotation>
      <xs:documentation>
        Specify a filled sphere by centre coordinates and inclusive radius.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DrawBlockBasedObjectType">
        <xs:attribute name="x" type="xs:int" use="required" />
        <xs:attribute name="y" type="xs:int" use="required" />
        <xs:attribute name="z" type="xs:int" use="required" />
        <xs:attribute name="radius" type="xs:int" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="DrawLine">
    <xs:annotation>
      <xs:documentation>
        Specify a line by start and end coordinates and thickness.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DrawBlockBasedObjectType">
        <xs:attribute name="x1" type="xs:int" use="required" />
        <xs:attribute name="y1" type="xs:int" use="required" />
        <xs:attribute name="z1" type="xs:int" use="required" />
        <xs:attribute name="x2" type="xs:int" use="required" />
        <xs:attribute name="y2" type="xs:int" use="required" />
        <xs:attribute name="z2" type="xs:int" use="required" />
        <xs:attribute name="steptype" type="BlockType" use="optional" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:element name="DrawObjectType" type="DrawObjectType"/>
  <xs:element name="DrawItem" type="DrawItem" substitutionGroup="DrawObjectType"/>
  <xs:element name="DrawLine" type="DrawLine" substitutionGroup="DrawObjectType"/>
  <xs:element name="DrawSphere" type="DrawSphere" substitutionGroup="DrawObjectType"/>
  <xs:element name="DrawBlock" type="DrawBlock" substitutionGroup="DrawObjectType"/>
  <xs:element name="DrawCuboid" type="DrawCuboid" substitutionGroup="DrawObjectType"/>

  <xs:element name="ClassroomDecorator">
    <xs:annotation>
      <xs:documentation>
        Adds a series of joined rooms into the world.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice>
        <xs:element name="complexity">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="building" type="ZeroToOne" />
              <xs:element name="path" type="ZeroToOne" />
              <xs:element name="division" type="ZeroToOne" />
              <xs:element name="obstacle" type="ZeroToOne" />
              <xs:element name="hint" type="ZeroToOne" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="specification">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="width" type="BuildingSize" />
              <xs:element name="height" type="BuildingSize" />
              <xs:element name="length" type="BuildingSize" />
              <xs:element name="pathLength" type="NonNegative" />
              <xs:element name="divisions">
                <xs:complexType>
                  <xs:all>
                    <xs:element name="southNorth" type="NonNegative" />
                    <xs:element name="eastWest" type="NonNegative" />
                    <xs:element name="aboveBelow" type="NonNegative" />
                  </xs:all>
                </xs:complexType>
              </xs:element>
              <xs:element name="horizontalObstacles" type="HorizontalObstacles" />
              <xs:element name="verticalObstacles" type="VerticalObstacles" />
              <xs:element name="hintLikelihood" type="ZeroToOne" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
      <xs:attribute name="seed" type="xs:string" use="optional" />
      <xs:attribute name="palette" type="PaletteEnum" use="optional" />
    </xs:complexType>
  </xs:element>

  <xs:simpleType name="PaletteEnum">
    <xs:restriction base="xs:string">
      <xs:enumeration value="default"/>
      <xs:enumeration value="random"/>
      <xs:enumeration value="dungeon"/>
      <xs:enumeration value="pyramid"/>
      <xs:enumeration value="igloo"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="HorizontalObstacles">
    <xs:all>
      <xs:element name="gap" type="NonNegative" />
      <xs:element name="bridge" type="NonNegative" />
      <xs:element name="door" type="NonNegative" />
      <xs:element name="puzzle" type="NonNegative" />
      <xs:element name="jump" type="NonNegative" />
    </xs:all>
  </xs:complexType>

  <xs:complexType name="VerticalObstacles">
    <xs:all>
      <xs:element name="stairs" type="NonNegative" />
      <xs:element name="ladder" type="NonNegative" />
      <xs:element name="jump" type="NonNegative" />
    </xs:all>
  </xs:complexType>

  <xs:simpleType name="BuildingSize">
    <xs:restriction base="xs:int">
      <xs:minInclusive value="7" />
      <xs:maxInclusive value="50" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ZeroToOne">
    <xs:restriction base="xs:double">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="NonNegative">
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>

  <!--============================================== QUIT PRODUCERS ===============================================-->

  <xs:element name="ServerQuitFromTimeUp">
    <xs:annotation>
      <xs:documentation>
        Specifies a time limit that applies to all agents.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="timeLimitMs" type="xs:decimal" use="required" />
      <xs:attribute name="description" type="xs:string" use="optional" default="" />
    </xs:complexType>
  </xs:element>

  <xs:element name="ServerQuitWhenAnyAgentFinishes">
    <xs:annotation>
      <xs:documentation>
        Specifies that the mission ends when any of the agents finish.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="description" type="xs:string" use="optional" default="" />
    </xs:complexType>
  </xs:element>

  <!--=============================================================================================================-->
  <!--=========================================== CLIENT-SIDE HANDLERS ============================================-->
  <!--=============================================================================================================-->

  <!--============================================== VIDEO PRODUCERS ==============================================-->
  
  <xs:element name="VideoProducer">
    <xs:annotation>
      <xs:documentation>
        Requests that video frames be sent.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Width" type="xs:int" />
        <xs:element name="Height" type="xs:int" />
        <xs:element name="DepthScaling" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:attribute name="min" default="0">
              <xs:simpleType>
                <xs:restriction base="xs:decimal">
                  <xs:minInclusive value="0"/>
                  <xs:maxInclusive value="1"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="max" default="1">
              <xs:simpleType>
                <xs:restriction base="xs:decimal">
                  <xs:minInclusive value="0"/>
                  <xs:maxInclusive value="1"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="autoscale" type="xs:boolean" default="true">
              <xs:annotation>
                <xs:documentation>
                  Set to false to specify the min and max depths manually. Default is true, where uses the min and max depths in the scene.
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="want_depth" type="xs:boolean" default="false">
        <xs:annotation>
          <xs:documentation>
            If true, returns depth in the fourth channel as RGBDRGBD.... Else as RGBRGB...
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="viewpoint" default="0">
        <xs:annotation>
          <xs:documentation>
            Sets the camera viewpoint. 0 = first-person, 1 = behind, 2 = facing.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:int">
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="2"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

  <!--============================================== AUDIO PRODUCERS ==============================================-->

  <!--============================================= COMMAND HANDLERS ==============================================-->

  <!-- Command lists -->

  <xs:simpleType name="ContinuousMovementCommand">
    <xs:annotation>
      <xs:documentation>
        Commands for smooth movement. Some examples:
      
        "{{{move 0.5}}}" - start moving forward at 50% of the normal walking speed (-ve = backward, +ve = forward).
        
        "{{{strafe -1}}}" - start moving left at 100% of the normal walking speed (-ve = left, +ve = right).
        
        "{{{pitch 0.1}}}" - start tilting the agent's head down at 10% of the maximum speed (-ve = up, +ve = down). The maximum speed is set by {{{turnSpeedDegs}}} in {{{ContinuousMovementCommands}}}. 
        
        "{{{turn 0.1}}}" - start turning right at 10% of the maximum speed (-ve = anti-clockwise/left, +ve = clockwise/right). The maximum speed is set by {{{turnSpeedDegs}}} in {{{ContinuousMovementCommands}}}. 
        
        "{{{jump 1}}}" - start jumping (1 = start, 0 = stop).
        
        "{{{crouch 1}}}" - start crouching (1 = start, 0 = stop).
        
        "{{{attack 1}}}" - start attacking (1 = start, 0 = stop). The 'attack' command is for destroying blocks and attacking mobs.
        
        "{{{use 1}}}" - start 'use'ing (1 = start, 0 = stop). The 'use' command is for placing blocks and for other things too.        
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="move" />
      <xs:enumeration value="strafe" />
      <xs:enumeration value="pitch" />
      <xs:enumeration value="turn" />
      <xs:enumeration value="jump" />
      <xs:enumeration value="crouch" />
      <xs:enumeration value="attack" />
      <xs:enumeration value="use" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AbsoluteMovementCommand">
    <xs:annotation>
      <xs:documentation>
        Commands to set position and orientation directly. Some examples:
      
        "{{{tp 23.5 1 -34.5}}}" - teleport the agent to the absolute position x y z (space delimited).
        
        "{{{tpx 230}}}" - set the agent's x coordinate, without altering the y and z.
        
        "{{{tpy 103.2}}}" - set the agent's y coordinate, without altering the x and z.
        
        "{{{tpz -32.5}}}" - set the agent's z coordinate, without altering the x and y.
        
        "{{{setYaw 30}}}" - set the agent's body orientation to be 30 degrees clockwise from south.
        
        "{{{setPitch 20}}}" - set the agent's body orientation to be 20 degrees down from horizontal.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="tpx"/>
      <xs:enumeration value="tpy"/>
      <xs:enumeration value="tpz"/>
      <xs:enumeration value="tp"/>
      <xs:enumeration value="setYaw" />
      <xs:enumeration value="setPitch" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DiscreteMovementCommand">
    <xs:annotation>
      <xs:documentation>
        Commands for moving and turning in discrete increments. Some examples:
      
        "{{{move 1}}}" - move the agent one block forwards (1 = forwards, -1 = backwards).
        
        "{{{turn 1}}}" - rotate the agent 90 degrees right (1 = right, -1 = left).
        
        "{{{movenorth 1}}}" - move the agent one block north.
        
        "{{{moveeast 1}}}" - move the agent one block east.
        
        "{{{movesouth 1}}}" - move the agent one block south.
        
        "{{{movewest 1}}}" - move the agent one block west.
        
        "{{{jump 1}}}" - move the agent one block up.
        
        "{{{look 1}}}" - look down by 45 degrees (-ve = up, +ve = down).
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="move" />
      <xs:enumeration value="turn" />
      <xs:enumeration value="movenorth" />
      <xs:enumeration value="moveeast" />
      <xs:enumeration value="movesouth" />
      <xs:enumeration value="movewest" />
      <xs:enumeration value="jump" />
      <xs:enumeration value="look" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="InventoryCommand">
    <xs:annotation>
      <xs:documentation>
        Commands for changing the contents of the inventory and hotbar.
        
        To move items around in the inventory you can use {{{selectInventoryItem}}} and {{{dropInventoryItem}}}. For example, to swap
        the contents of slots 13 and 14, issue these two commands in this order:
      
        "{{{selectInventoryItem 13}}}"
        
        "{{{dropInventoryItem 14}}}"
        
        Other commands:
        
        "{{{discardCurrentItem 15}}}" - discards the item that is in slot 15 in the agent's inventory.
        
        "{{{hotbar.1}}}" - select hotbar slot 1 as the currently-held tool. This affects the attack and use commands - e.g. if the agent does 'use' while holding
        a block item it will place the block into the world.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="selectInventoryItem" />
      <xs:enumeration value="dropInventoryItem" />
      <xs:enumeration value="discardCurrentItem" />
      <xs:enumeration value="hotbar.1" />
      <xs:enumeration value="hotbar.2" />
      <xs:enumeration value="hotbar.3" />
      <xs:enumeration value="hotbar.4" />
      <xs:enumeration value="hotbar.5" />
      <xs:enumeration value="hotbar.6" />
      <xs:enumeration value="hotbar.7" />
      <xs:enumeration value="hotbar.8" />
      <xs:enumeration value="hotbar.9" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ChatCommand">
    <xs:annotation>
      <xs:documentation>
        A command for broadcasting text messages to the other players. An example:
      
        "{{{chat I have found diamonds!}}}" - broadcasts the string "{{{I have found diamonds!}}}".
        
        Chat messages from other players can be observed using {{{ObservationFromChat}}}.
{'fraction_non_alphanumeric': 0.17782793335907107, 'fraction_numerical': 0.006503727021649392, 'mean_word_length': 2.6544033859677683, 'pattern_counts': {'":': 0, '<': 1355, '<?xml version=': 2, '>': 1355, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7218959', 'n_tokens_mistral': 20059, 'n_tokens_neox': 19056, 'n_words': 4374}