We can make the mission even harder by putting lava onto the agent's path after a certain number of actions are performed. First, start by creating a mission specification using the schema XML:
MissionSpec mission = MalmoEnv.loadMissionXML("cliff_walking_rl4j.xml");
Now, setting the lava challenge on the mission is as simple as follows:
mission.drawBlock(xValue, yValue, zValue, "lava");"
malmoEnv.setMission(mission);
MissionSpec is a class file included in the MalmoJavaJar dependency, which we can use to set missions in the Malmo space.