In this tutorial I’ll show you how to set up and install your very own data pack. This is the first tutorial I’ve seen that uses a very useful new extension for Visual Studio Code, that makes datapack creation far easier than ever before. So come with me as we jump through the basic hoops necessary to get your datapack up and running. Questionnn for the audience: Why use a datapack instead of, y’know, command blocks? Command blocks seem awfully nice. You put a command into them, and it runs them! Either when activated or every tick. Isn’t that awfully simple? Well, the main issue is that command blocks are inextricably tied to the corporeal plane. They’re blocks. The issue with blocks is that- [WALLOFTEXT] Anyway, Datapacks are saved within the world file, in a separate directory called “datapackssssss”. Datapacks can contain functions, which do everything command blocks can do but better, Faster, and easier. Now that you understand the premise here, and why it’s EXTREMELY important that you learn how to make datapacks IMMEDIATELY. Let’s start with the most essential tool of the trade: MicROSofT NoTePA- *laughing* I’m kidding. A true servant of the people made a datapack syntax highlighter for Visual Studio Code. So that’s what we’re gonna use. STEP 1: Download and install visual studio code. You can get it here at code.visualstudio.com or by typing “visual studio code” into google. Smack the big download button. Don’t worry too much about the settings in the installer. Unfortunately, there’s no official datapack support from Microsoft. Once you’ve got that installed we can head over to step 2. STEP 2: This is the main point of this video. Data pack helper plus, is the first actually good tool I’ve ever seen for datapack creation. It gives us something akin to autocorrect for Minecraft commands. It is Unbelievably useful. Anyway, Go to this page (link in the description, again) and click on install. It should ask if you want to allow the page to run Visual Studio Code, and of course you do. Click OK (allow). They also recommend using this syntax highlighting extension to make it easier to read! I also recommend it. Great! That’s all the installation we have to do. Now on to step 3. STEP 3: Make a world. Here I’ll make a new void world. I go More World Options -> World Type: Superflat -> Customize -> Presets, and pick void world. This preset gives us a nice (cobble)stone platform, at the cost of the absolute worst color grass in the entire game. Let’s prevent that by replacing minecraft:the_void with minecraft:forest. Nice! Now just set a block somewhere. I’ll do /setblock 0 64 0 stone. This gives us a stone block at the coordinates 0, 64, 0. Oh, and if you forgot to set your gamemode to creative mode, it’s best to just give up now. Because you will be stuck in an endless void, falling to your death, Forever. Step 4: Now that our world is set up, open Visual Studio Code. You should have something that looks similar to this. The first thing we have to do is find our datapack folder. Click on open folder (not open file) or go File -> Open Folder. To find you .minecraft folder from here, click on an empty part of the top bar and type %appdata%. Now open .minecraft, find saves by pressing S to select the first file that starts with the letter S. Now sort by date modified, and open your world. There should be a folder here called datapacks, open it, and now (finally) create a new folder for your datapack! Right click -> New Folder, and name it whatever you want, I’ll call this one “Tutorial”. Infinite creativity on display here. Now either select it or open it, and hit Select Folder in the bottom right. If everything worked, you should now have a small empty folder on the left. Here’s mine called “Tutorial”. Ok, lookin’ good! Next we have to set up the contents of the datapack. First, create a file by clicking the Create File button, and call it “pack.mcmeta”. It’s very important that you type it EXACTLY like this. This file tells Minecraft what version your data pack is made for, and lets you write A description for it. Here’s how to write this file. First an open curly bracket {. Then in quotes, “pack”: then another pair of curly brackets “pack_format”: 6, make a new line an them write “description”: (in quotes) and then you can write in quotes whatever you want. I’ll write “Example data pack” then make sure you closed off the curly brackets and there’s absolutely no mistakes. Or you could copy and paste it from the description! Up to you. Also, quick note about pack format. This number goes up every time datapacks get a significant update. As of 1.16.2 [and 1.16.3] the latest format is 6. If you want to know the most up to date information, you can go to the Minecraft wiki page on data packs and- Oh come on! They got this one wrong too?! Now we can start getting into the good stuff. Create a new folder and call it whatever you like. You know how everything in vanilla is prefixed with minecraft? Like minecraft:stone for stone, minecraft:forest for forest biomes, or- you get the idea. This is called a namespace. The name of this folder will be the namespace for your data pack and everything in your Data pack will be prefixed by the name of this folder. Create your folder, and call it something short and unique. You can actually create as many namespaces as you want, but they all have to be stored within a folder called “data”. So in your master folder create a folder called “data”. Move your namespace in there. It’ll ask you if you want to confirm and you say, “Move!” Now inside your namespace, there are a lot of different types of files we can create. This tutorial will only be covering the objectively best part, functions. So create a folder called “functions”. Inside THIS folder we can finally create some functions. Create 2 new files called “tick.mcfunction” and “load.mcfunction”. Tick will be called every tick, just like a repeating command block, and load will be called once, when you open the world or reload the data pack. Before we write anything in these we need to tell the game that they exist. So, click on the original “data” folder and create a new folder called “minecraft”. Then inside that folder create a folder called “tags”, then inside that folder create a new folder called “functions”. Now create 2 files in this folder called “tick.JSON” and “load.JSON”. Now it’s giving us an error because we have nothing written in these files. Write in text exactly like this, except replace the namespace “tutorial” *”code” with whatever your namespace was. Go ahead and pause the video, the text will be in the description so you can copy and paste it. Ok, have you done it in both of the files? Make sure tick.json has your tick function, and load.json has your load function. Step five-nally, we can write some code! OK we’re all done with those two .JSON files, you can close them now, and open load.mcfunction! Now you can write your beautiful load message! With a giant ascii art of a dog that takes up the entire chat!!!! Or, you could not. Just think about it. Ok, we can write a little load message. For educational purposes. An mcfunction file is just a long list of commands that all get run in order, whenever the function is called. The reason we’re using visual studio code to write this, is that it makes writing commands much easier. Check it out: I want a message to display when my datapack Loads, so I’ll write (with no slash) tellraw @a (look how it’s highlighting it) I type an open curly bracket “{“ and then if I hit ctrl/cmd+SPACE, a list of things that I can put here just pops up. So I’m gonna pick text, and it puts our cursor right where we can type. So I’ll type “My Code is Load”! Now i want to add a color so, move out of the quotes and type a comma, (to split up the tags) and then start typing color, and bam, it’s already there. I’m gonna type #0000FF, this will give me pure blue. Because, as of 1.16 minecraft can have text in any color!!! Truly the greatest change since boat physics. To see our beautiful load message, go into your world and type /reload. There it is! No need to open and close the world, just use the /reload command to reload your datapacks. You know, let’s go off script a little here. I’d like to give you a fun example of what functions can Really do. I’ll show you how to make a very simple example. I’ll create a new function in my functions folder called sheep.mcfunction. In it I’ll write execute at @s run summon sheep And thennnn *copy and pastes it 50 times*. Now if it type /reload and then Muahahahahahahah AHAHAHAHAHAHAAa. It’s beautiful! To summon all these sheep I used the /execute command. Oh look, there’s a tutorial for it! Ifff you only watched to the end of this video for my incredible legitipersonality, why not Check out this video where I make fun of the redstone in a not-so-scary horror map with boolin_brennan! Or you could just, disappear into the void like the rest of them… Up to you ;^) Video Information
This video, titled ‘How to Make a Datapack [Minecraft 1.20-1.16] Datapack Tutorial’, was uploaded by Legitimoose on 2020-09-08 02:37:36. It has garnered 505983 views and 17928 likes. The duration of the video is 00:09:25 or 565 seconds.
Working in 1.19, 1.18, 1.17 and 1.16! Learn how to make a datapack in minecraft 1.19 with my hot new datapack tutorial! I only cover functions in this tutorial because I think that’s the most useful feature of datapacks. Leave a comment if you have questions!
===Important Links!=== Visual Studio Code: [ http://code.visualstudio.com/ ] Datapack extension: [ https://marketplace.visualstudio.com/items?itemName=SPGoding.datapack-language-server ] Semantic (Syntax) Highlighting: [ https://marketplace.visualstudio.com/items?itemName=arcensoth.language-mcfunction ]
My Discord Server [ https://discord.gg/n7z4sVG ] My Twitch [ https://www.twitch.tv/legitimoose ] My Editor [ https://www.instagram.com/ciara_millinery/ ]
TEMPLATE: is pinned in my discord server’s #help channel, you can find it there if you’re feelin’ lazy ; )
Timestamps: 0:00 – Explanation 1:20 – Installing Visual Studio Code 1:40 – Adding Datapack Extensions 2:13 – How to Make a Void World 2:58 – Setting Up Your Datapack 6:59 – WRITING CODE 8:29 – s h e e p (demonstration)
===COPY & PASTE ZONE=== edit: changed pack_format to 8 for 1.18 edit 2: changed pack_format to 9 for 1.18.2 edit 3: changed pack_format to 10 for 1.19 edit 4: for other versions, check this page https://minecraft.fandom.com/wiki/Data_pack#Pack_format pack.mcmeta: { “pack”: { “pack_format”: 15, “description”: “§cyoutube.com/c/legitimoose §d;^)” } }
load.json: { “values”: [ “tutorial:load” ] }
tick.json: { “values”: [ “tutorial:tick” ] } ===END COPY PASTE ZONE===
=== l o n k s === Discord: https://discord.gg/n7z4sVG Twitter: https://twitter.com/Legitimoose Patreon: https://www.patreon.com/legitimoose
In this minecraft datapack tutorial, you will learn: how to make a datapack, how to use functions in minecraft, and useful things like how to set up pack.mcmeta. I’ll use Data-pack Helper Plus/Datapack Helper plus, and Arcensoth’s language mcfunction extension. These are powerful visual studio code minecraft extension(s) that will help us greatly. And VSCode is an IDE that can be used for minecraft. It’s much better than notepad++ or sublime text (although there is a sublime text highlighter). The /function command is one of the best minecraft commands, and is essentially functional programming in minecraft. So, if you want to learn how to make a data pack, or datapacks, or watch a minecraft data pack tutorial/datapack tutorial for minecraft 1.16 or 1.17 (even minecraft 1.16.2, which is slightly different (minecraft 1.16.3/1.16.4 is the same)) or learn how to make a minecraft datapack, then you’ve come to the right place! ~Metadata Soupsmith