#VS2017 – Sample ConsoleApp to initialize missions in #Minecraft with Xml #ProjectMalmo


Before continuing to analyze the sections that have an xml file with the definition of a mission in Minecraft, I will share a small ConsoleApp sample project which creates from scratch the necessary elements to interact in a Minecraft mission.

The function that initializes the mission from a file is

private static void InitMissionSpecs()
var missionXmlDefinition = File.ReadAllText("SampleMission.xml");
_mission = new MissionSpec(missionXmlDefinition, false);
_mission.requestVideo(640, 480);
var recordedFileName = $"./mission_data{DateTime.Now:hh mm ss}.tgz";
_missionRecord = new MissionRecordSpec(recordedFileName);
_missionRecord.recordMP4(20, 400000);

In line 4 we can see the definition in plain xml mode can be used in the MissionSpec() constructor. From this moment, the mission is created with the parameters of the file.

It is possible, once created about writing some values, as for example in line 5 where I define the video quality with which the mission will be executed.


Sample Project en GitHub link

Greetings @ Toronto

El Bruno




Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: