How to Convert Your Minecraft World (.mcworld) into a Template (.mctemplate)


As Minecraft Education Ambassadors, many of you may be considering submitting your worlds for the Minecraft Library to  make them freely available to other students and educators (only Minecraft Education Ambassadors can submit content for the Minecraft Education Library). 

As such, there are a number of checklist items your Minecraft experience will need to pass before it can be accepted, and ultimately, the last step will be converting your Minecraft World (as a .mcworld) to a .mctemplate. To make your life,  and the life of the people processing these requests easier, I'm posting here, step-by-step, the processes you will need to take (please note, I don't cover the actual submission process in this article, it's all about the prep work!)

A quick note before we dive in, this article is written with the assumption that you already have a good handle on resource packs, Windows File Explorer, etc and that you're working on a Windows PC. If you're not there yet, and these instructions seem like Klingon, then you may want to PM me on the Facebook Minecraft Educators Teacher's Lounge for extra help. Finally, before we dive in, I'd like to give Colton Phillips and Sarah Elliott (@fantasiaTC) a HUGE shoutout here for all their help and support understanding this tricky subject! 

Let's start with a brief checklist, then we'll get into details:  

Checklist

1. Is your world finished? Are you sure? 

Make sure that your world is playable and has been thoroughly beta tested, preferably by both other educators and students and that you've worked out all the bugs and parts where instructions might be clear. In my experience, students will spot different problems than educators (and vice-versa), so the better age group spread you have testing, the better! You may want to read some of my other blogs on world building to help in this regard. 

You'll also want to double-check you have all the player settings set the way you want the player to experience the world before going further, and make sure that only the items you want the students to start with are in your hotbar or personal inventory (I always forget to remove the command block and other builder tools!)

2. Cleanup your resource and behavior packs

If you have added custom elements like items, blocks or entities, you'll want to make sure your pack is in the best shape for submission. There's a handful of things you'll need to tidy up or consider, and if you don't clean them up before submission, they'll be flagged and you'll need to fix them later anyway. If you don't have any custom .mcaddons, then you needn't worry. 

3. Add a manifest file to your world

This is a .json file with specific script that tells Minecraft what to do with the file (in this case, identifying it and treating it as an .mctemplate). If it isn't 100% correct, your template will fail to import. Viewing and editing .json files is best done with Visual Studio Code. It's free to download and use, and it's a incredible tool that makes the process a lot easier!

4. Convert your world into a .mctemplate

Those are the four main items you'll need to deal with before submission. I'll now get into details processes for points 2, 3 and 4. By the way, it will take you longer to read this post than it will to actually create a .mctemplate!

Preparing your world for work

Step 1: I cannot stress this enough... back up your worlds by exporting them! Do not count on the automatic cloud backup to save your bottom. I've been working with computers since the early 1980s, and if there's anything that I've learned in all that time and taken to heart, it's that making multiple redundant backups (online and offline) will save you time, effort and many tears later when it REALLY matters. If you're not familiar with how to manually export your Minecraft worlds, I've got a handy wee video on how to do that, here

Step 2: Once you've got your world backed up: 
  1. Open Minecraft Education
  2. Go to View My Worlds
  3. Click on your target world (the world you want to convert) and go to Settings
  4. Change the name to your desired, final version for submission. (Typically in development I have a lot  of version numbers tagged on here. I remove them from the World Name field at this point; version  numbers will now be in the manifest files). 
  5. DO NOT open or interact with any other worlds in Minecraft at this point. The "why" here will be explained shortly. 
  6. Close Minecraft.
Finding Your World in File Explorer

All the work we're going to do is in the saved worlds folder, buried on your computer's C: drive. 

Step 1: Go to your Minecraft Education saved worlds location in File Explorer. These are located at: 

C:\Users\USER\AppData\Roaming\Minecraft Education Edition\games\com.mojang\minecraftWorlds

*You'll need to turn on "Hidden Items" in File Explorer (in File Explorer, click View>Show> and check off "Hidden Items". While you're here, make sure "File Name Extensions" is also selected... you're going to need this later! By the way, "USER" in the above file path will be your user account, so it will look like the username for your computer. 

Step 2: Once you get to this file location, you'll note that all the folder in here are named like so:                        
"i0MqA5D0gzA="

Each of these folders is one of your Minecraft Education worlds. Make sure you arrange them by Date Modified, and have the most recent at the top. This will make sure that the most recently modified world/world settings in Minecraft Education is at the top. This is why it's important not to open any other worlds or world settings other than the world you want to convert to a .mctemplate. It will make it a lot harder to identify otherwise! 

Note that the files are arranged by date/time with most recent at the top.

Cleaning up your Resource & Behavior Pack folders

Open the top folder in your Minecraft Worlds folder. There's a lot of stuff in here, but for now, we're going to focus on the resource_pack and behavior_pack folders. This is what you should see: 

World file contents

Step 1: Delete the desktop.ini files from all folders and subfolders inside resource_packs and behavior_packs

Delete the desktop.ini file from each of these folders, and all their subfolders. If you don't see this item, make sure you have "Hidden Items" selected in File Explorer. This will probably take a few minutes, especially if you have a large pack with lots of subfolders! What is a desktop.ini file? Should you be worried about deleting it? In this context, no, it's nothing to be worried about and I won't get into technical details about it... you've already got enough to read!

Example: This desktop.ini in hiding out in the texts subfolder

Step 2: Make sure all your items, blocks and entities have names that are less than 15 characters. If any of them exceed 15 characters, you're probably best going back to your development folders, and edit the packs there, then repack, adding to the world again, and testing to make sure nothing was broke... then starting this entire process over. 

Step 3: Make sure your manifest files in both resource_pack and behavior_pack folders have no references to Blockbench. 

In the below file, under "metadata" note the "generated_with" line referencing Blockbench.  


Remove the "generated_with" lines so that it looks like the next image: 


For authors, you can have anything you want... "otb" are just the initials of my organization. 

Step 4: As noted in the image below, ensure these lines have the following values: 

            "format version": 2 

Must be version 2, although this will likely only needed to be checked in older packs you're editing. 

            "min engine version": [1, 14, 0]

[1, 14, 0] is the absolute minimum this can be, although typically I bump it up to [1, 16, 0]. 


Step 5: Eliminate duplicate packs. 

If you see multiple resource/behavior packs in these folders with the same name, this means you've added multiple versions of the same pack. They're all likely older, redundant versions. The trick here is discerning which one is the newest, and which ones are older that you can delete. This typically happens if you're packaging up Resource and Behavior packs as .mcaddons and adding them as you developed the resources and the world. There is a better practice (and easier method using the development folders... subjects for a future blog). 

Typically, you'll see something like this though: 

mypack
mypack(1)
mypack(2)

The most recent version will likely have a higher number appended to it, but check date/time stamps or version numbers in the manifest.json files to help figure it out. 

Converting your World to an .mctemplate

Finally! What a marathon of reading! You've made it through to the easiest and quickest part!

Let's navigate in File Explorer back to the root of the world folder you're working in: 

 
Step 1 (Optional): Pack Icons (pack_icon.png)

This file which you'll find in both resource_pack and behavior_pack folders is for the purposes of adding your own logo or visual identifier for your packs. It's dimensions can be 16x16, 32x32, 64x64, 128x128, and 256x256 pixels. Any other sizes or dimensions are not accepted and it must be named "pack_icon" with the .png file extension. You do not need to replace the default image if you don't want to. If you do, just make sure it's the right size, named "pack.incon.png", copy, paste and replace!

I usually make this change while I'm building my .mcaddon

Step 2 (Optional): World Icon (world_icon.jpeg)

This file provides a thumbnail or titlecard for your world in View My Worlds, or in the Library. It's dimensions should be no more than 800x450 pixels, must be named, "world_icon" and it must be saved as a .jpeg file extension. You don't need to replace it, but I think it makes your world stand out a bit more if you have a nice thumbnail. Again, just make sure it's the right size, named "world_icon.jpeg", copy, paste and replace!

*Note, this image will be replaced on the players computer once they start playing in the world.

Step 3: Add a new manifest.json file to the root of your world folder. You can copy this template. It should look like this:

 {
"format_version": 2,
"header": {
"base_game_version": [1, 20, 10],
"name": "Santa's Workshop",
"description": "Winter Activity World",
"version": [2, 5, 0],
"uuid": "454227b8-7b70-4998-8b9c-2f373122d9da",
"lock_template_options": false
},
"modules": [
{
"version": [2, 5, 0],
"type": "world_template",
"uuid": "eadadbea-5a90-4738-b41d-7eeb0c29663f"
}
],
"metadata" : {
"authors" : ["OTB"]
}
}
 
So, what's important here? First, make sure you're editing this code in Visual Studio Code! It will identify any errors that might occur while you're editing it. Now, let's break it down: 
  1. Format Version: 2 This is super critical and must be 2.
  2. Base Game Version: Recommended to be within at least one version of the current release (as of this writing, we're at 1.21.05)
  3. Name: Replace "Your World Name" with the name of your world. Keep the quotations!
  4. Description: Replace "Your world description" with a brief description of your world. You can also leave it blank, and just leave the quotes, so: "". 
  5.  Version: This is a unique version number that pertains to your world. So, if you've been using version numbers as you developed this world, I would change this to reflect your version number. So, for example, if this will be the 4th and final version of this world coming out of development, change the entry to: [4,0,0] Make this the same in both the Header and Modules sections. 
  6. UUID: For this, you'll need to use a UUID generator to replace "UUID #1 here" in Header, and "UUID #2 here" in Modules. Use two different UUIDs. 
  7. Lock Template Functions: This locks your template settings. Change to true if you want them locked. Keep false otherwise. 
  8. Type: "world_template" Do not change this. This determines that the file is a world template. 
  9. Authors: This is the going to be the author of the pack. For example, "OTB" are the initials of my company, but you can put in whatever is appropriate, could be your own name, initials or organization. 
Here is an example of what your file should look like: 


Step 5: Go back into Minecraft, export your target world. It will be exported as a .mcworld file. 

Step 6: Right-click on the file, select "rename" and change the .mcworld extension to .mctemplate

*If you don't see file extensions, you'll need to turn these on in File Explorer as noted earlier. 

Step 7: To import the template, double-click on it. It should import into Minecraft Education (you'll get a pop up message indicating success or failure). If successful, you should be able to find it in View My World>Templates

If it successfully imports, but you don't see it, you may need to delete the world you worked from in "View Worlds", or alternatively, try importing it on another computer with Minecraft Education. 

*If there are any older versions of your template that you've imported, make sure you delete them first as they will cause a failure to import. 

Finally, I hope this helps, and good luck in your template making!

Comments

  1. Just curious - why are references to Blockbench removed from the metadata?

    ReplyDelete
    Replies
    1. Not sure. It's just flagged as an issue when worlds are submitted. I'll inquire further.

      Delete

Post a Comment

Popular Posts