Minecraft Blogs / Tutorial

Important commands for making DataPacks in 1.17

  • 1,854 views, 3 today
  • 14
  • 8
  • 3
DiversifiedPlayz
Level 87 : Elite Creator
1,696
Here is a list of commands I found useful while making DataPacks :

initialise scoreboards :-
scoreboard objectives add <score> minecraft.custom:minecraft.jump
scoreboard objectives add <score> minecraft.custom:minecraft.sneak_time

reset scores
scoreboard players set @a[​scores={<score>=1..}] <score> 0

nbt of an item
@e[​type=item,nbt={Item:{id:"<item>"}}]

player holding and right clicking with an item
execute as @a[​nbt={SelectedItem:{id:"<item>",tag:{<tag>:1b}}},scores={<right_click_score>=1..}] at @s run

kill entity if its not near another entity [​kills entity with <tag_1>]
execute as @e[​tag=<tag_1>,type=armor_stand] at @s unless entity @e[​type=wolf,tag=<tag_2>,distance=0..1] run kill @s

Passenger tag [​entity 2 will ride entity 1]
summon <entity_1> ~ ~ ~ {Tags:["<your_tag>"],CustomName:'{"text":"<custom_name>"}',Passengers:[{id:"<entity_2>",Silent:1b,Small:1b,Invisible:1b,NoBasePlate:1b,Tags:["<tag_1>"],DisabledSlots:4144959,ArmorItems:[{},{},{},{id:"minecraft:diamond_pickaxe",Count:1b,tag:{Unbreakable:1b,CustomModelData:1}}]}]}

replace players head slot with item
item replace entity @s armor.head with <item>

Some good generators:-

https://mcstacker.net/

https://crafting.thedestruc7i0n.ca/

https://haselkern.com/Minecraft-ArmorStand/

https://vberlier.github.io/animated-models/

I will try to update this post will more commands and tutorials in the future.

If you have any more commands you would like to be mentioned leave them in the comments
Tags

Create an account or sign in to comment.

FogiPL
05/08/2022 6:22 am
Level 46 : Master uwu
xD, how but i know all these generators,
mcstacker the best
thedestruc7i0n is good
haselkern use always while creating map
i use json model generator once
minecraft.tools, i use it before i meet mcstacker, using now for banners and tellraw generator
1
SirKrunk
11/01/2021 1:44 am
Level 46 : Master Dragon
here another generator minecraft.tools
1
HoboMaggot
08/29/2021 12:53 am
Level 53 : Grandmaster Blob
history
You should add in optimisation techniques, so people dont spam nbt checks every tick and lag their world.
/execute store and /data are 2 really important commands too
1

Welcome