Data packs can be used to add or modify functions, loot tables, world structures, advancements, recipes, tags, dimensions, predicates and world generation. Show What not to do[]There are some things that you should not do while creating a data pack. Here is a list of "don'ts":
Creating a data pack[]To create a data pack, start off by navigating to the To find the world folder, locate the
Once you are in the The first thing to do after you are in the folder is to create a { "type": "minecraft:entity", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "functions": [ { "function": "minecraft:set_count", "count": { "min": 0, "max": 2, "type": "minecraft:uniform" } }, { "function": "minecraft:looting_enchant", "count": { "min": 0, "max": 1 } } ], "name": "minecraft:leather" } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "functions": [ { "function": "minecraft:set_count", "count": { "min": 1, "max": 3, "type": "minecraft:uniform" } }, { "function": "minecraft:furnace_smelt", "conditions": [ { "condition": "minecraft:entity_properties", "predicate": { "flags": { "is_on_fire": true } }, "entity": "this" } ] }, { "function": "minecraft:looting_enchant", "count": { "min": 0, "max": 1 } } ], "name": "minecraft:beef" } ] } ] }2 file. This lets Minecraft identify your data pack. Creating an MCMETA file[]See also: Data_pack § pack.mcmeta To create an MCMETA file, right click within your data pack folder and create a new text document. Name this file "pack.mcmeta". NoteMake sure the file extension is { "type": "minecraft:entity", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "functions": [ { "function": "minecraft:set_count", "count": { "min": 0, "max": 2, "type": "minecraft:uniform" } }, { "function": "minecraft:looting_enchant", "count": { "min": 0, "max": 1 } } ], "name": "minecraft:leather" } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "functions": [ { "function": "minecraft:set_count", "count": { "min": 1, "max": 3, "type": "minecraft:uniform" } }, { "function": "minecraft:furnace_smelt", "conditions": [ { "condition": "minecraft:entity_properties", "predicate": { "flags": { "is_on_fire": true } }, "entity": "this" } ] }, { "function": "minecraft:looting_enchant", "count": { "min": 0, "max": 1 } } ], "name": "minecraft:beef" } ] } ] }3 and not { "type": "minecraft:entity", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "functions": [ { "function": "minecraft:set_count", "count": { "min": 0, "max": 2, "type": "minecraft:uniform" } }, { "function": "minecraft:looting_enchant", "count": { "min": 0, "max": 1 } } ], "name": "minecraft:leather" } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "functions": [ { "function": "minecraft:set_count", "count": { "min": 1, "max": 3, "type": "minecraft:uniform" } }, { "function": "minecraft:furnace_smelt", "conditions": [ { "condition": "minecraft:entity_properties", "predicate": { "flags": { "is_on_fire": true } }, "entity": "this" } ] }, { "function": "minecraft:looting_enchant", "count": { "min": 0, "max": 1 } } ], "name": "minecraft:beef" } ] } ] }4 when you rename it! In other words, remove your old file extension. You may be warned that changing a file name extension could make the file unusable. However, this actually indicates that you have renamed the { "type": "minecraft:entity", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "functions": [ { "function": "minecraft:set_count", "count": { "min": 0, "max": 2, "type": "minecraft:uniform" } }, { "function": "minecraft:looting_enchant", "count": { "min": 0, "max": 1 } } ], "name": "minecraft:leather" } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "functions": [ { "function": "minecraft:set_count", "count": { "min": 1, "max": 3, "type": "minecraft:uniform" } }, { "function": "minecraft:furnace_smelt", "conditions": [ { "condition": "minecraft:entity_properties", "predicate": { "flags": { "is_on_fire": true } }, "entity": "this" } ] }, { "function": "minecraft:looting_enchant", "count": { "min": 0, "max": 1 } } ], "name": "minecraft:beef" } ] } ] }2 file correctly. If you are using Microsoft Windows and can't see file extensions, for Windows 10, you can turn them on by going to the View menu of the file explorer and checking the check box for file name extensions. For Windows beneath Windows 10, you can uncheck "hide extensions" in folder settings. Text editor[]Any text editor should work. It is recommended that the chosen text editor supports JSON, which is the format used by files of { "type": "minecraft:entity", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "functions": [ { "function": "minecraft:set_count", "count": { "min": 0, "max": 2, "type": "minecraft:uniform" } }, { "function": "minecraft:looting_enchant", "count": { "min": 0, "max": 1 } } ], "name": "minecraft:leather" } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "functions": [ { "function": "minecraft:set_count", "count": { "min": 1, "max": 3, "type": "minecraft:uniform" } }, { "function": "minecraft:furnace_smelt", "conditions": [ { "condition": "minecraft:entity_properties", "predicate": { "flags": { "is_on_fire": true } }, "entity": "this" } ] }, { "function": "minecraft:looting_enchant", "count": { "min": 0, "max": 1 } } ], "name": "minecraft:beef" } ] } ] }6 extension and most other files in a data pack. Note that most text editors do not recognize { "type": "minecraft:entity", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "functions": [ { "function": "minecraft:set_count", "count": { "min": 0, "max": 2, "type": "minecraft:uniform" } }, { "function": "minecraft:looting_enchant", "count": { "min": 0, "max": 1 } } ], "name": "minecraft:leather" } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "functions": [ { "function": "minecraft:set_count", "count": { "min": 1, "max": 3, "type": "minecraft:uniform" } }, { "function": "minecraft:furnace_smelt", "conditions": [ { "condition": "minecraft:entity_properties", "predicate": { "flags": { "is_on_fire": true } }, "entity": "this" } ] }, { "function": "minecraft:looting_enchant", "count": { "min": 0, "max": 1 } } ], "name": "minecraft:beef" } ] } ] }6 extension as JSON. Thus, you need to configure the editors manually.
|