This is awesome dude! As someone who is just getting into making datapacks after they changed up components and other stuff recently, it's been super valuable to have people I can watch and learn from.
Very usefull indeed. Thanks for showing! Love how I could redo everything in my project like every few months, cause of new versions and learning of such features lol
I can't believe you still work with Minecraft commands after over 8 years, I watched DanTDM play "A Weekend in Hartsville" and "Quantum Labs" and those were some of my favorite maps I've ever watched him play. Keep doing what you do best! :D
Seeing what you can do with datapacks as they add more commands is so nice, now I wish they would add more freedom in the entity selector, like if I want to select @e[type=cow or type=sheep] to select both cows and sheep
@@vat1n456 yes I’m aware, but that still takes 4 commands, it would be nice to be able to do it in 1, not to mention if you want more different entities you need even more
@@AwesomeDomi1 I agree. The selectors are pretty restrictive since they don't always support the 'OR'. It should be nice to see new concepts like sets of arguments in order to let the game choose between the type A or B. For example, /execute if entity @e[type=(minecraft:cow,minecraft:sheep)]. Unluckily, it's not here yet Otherwise, I think there is a workaround in one line. I don't know if it's satisfying, but : /execute unless entity @e[type=!cow] unless entity @e[type=!sheep] Explanation : Let A and B be the statements A="this is a cow" and B="this is a sheep". It's known that the expression "A or B" (our main goal) is equivalent to "not A and not B" (which explains the appearance of "unless" keyword and the "!" inside selectors)
getting into datapacking, and seeing examples of stuff like /return is really helpful, ty!! like. my functions are a bit messy... but im learnin what return does, and what execute store does...
Thanks, this helped a lot, but how would you check for the value of one variable, not as two separate booleans? For example, X could be 0, 1 or 2. (i’m trying to make a random decision function)
Summary: #IF execute (condition) run return (answer) #ELSE (another) condition is like using if or something else like predicates idk answer is like a command or function, anything another is the other bits in your file, this can be a IF statement also
yes plzzz new UI I have been stuggeling to update your old UI to 1.21 also I was able to change the ender chest stone button on head to a light gray stained glass pane inside the new crafting.slot.0 and everytime someone opens there inventoty and closes it or throws it out it copys it back to the crafting slot, but I am struggeling whith air{drop_contents:1b} cuz whith the new components that nolonger works
return in an execute statement breaks the flow of the script ; is this neat behaviour common to the return command as well, more than the return subcommand of /execute ?
so if the return command is unsuccessful it will allow the following commands to run as normal but if it runs successfully it will stop the function early?
If you run return it kills the current function. So if you have conditional stuff before running the return command and that conditional stuff fails, of course the command will not run
This is the #1 reason I was so hyped when they added "/return run" lol, great to see you covering it :)
This is awesome dude!
As someone who is just getting into making datapacks after they changed up components and other stuff recently, it's been super valuable to have people I can watch and learn from.
Very usefull indeed. Thanks for showing! Love how I could redo everything in my project like every few months, cause of new versions and learning of such features lol
hell yeah a conure and cloud wolf upload on the same day
Needed this so bad. Absolute Godsend
This is awesome! Can't wait to figure out all the uses for this!
if i ever get around to a new ui tutorial i will for sure use it there
finally. so many use cases for this. I would be interested in the UI tutorial!
Long time fan just wanted to say thanks for keep coming back to share these nuggets. Best
I can't believe you still work with Minecraft commands after over 8 years, I watched DanTDM play "A Weekend in Hartsville" and "Quantum Labs" and those were some of my favorite maps I've ever watched him play. Keep doing what you do best! :D
Goodness me I am excited. I remember searching up desperately looking for this function and was disappointed.
Glad it's here!
Seeing what you can do with datapacks as they add more commands is so nice, now I wish they would add more freedom in the entity selector, like if I want to select @e[type=cow or type=sheep] to select both cows and sheep
You can do this with custom entity tags
/tag @e remove OurTag
/tag @e[type=cow] add OurTag
/tag @e[type=sheep] add OurTag
--> @e[tag=OurTag]
@@vat1n456 yes I’m aware, but that still takes 4 commands, it would be nice to be able to do it in 1, not to mention if you want more different entities you need even more
@@AwesomeDomi1 I agree. The selectors are pretty restrictive since they don't always support the 'OR'. It should be nice to see new concepts like sets of arguments in order to let the game choose between the type A or B. For example, /execute if entity @e[type=(minecraft:cow,minecraft:sheep)]. Unluckily, it's not here yet
Otherwise, I think there is a workaround in one line. I don't know if it's satisfying, but :
/execute unless entity @e[type=!cow] unless entity @e[type=!sheep]
Explanation :
Let A and B be the statements A="this is a cow" and B="this is a sheep". It's known that the expression "A or B" (our main goal) is equivalent to "not A and not B" (which explains the appearance of "unless" keyword and the "!" inside selectors)
I remember you from my favorite map when i was like 11, a weekend in heartsville! thanks for being apart of my childhood!
I love your tutorials. I haven't coded in minecraft since they added datapacks but your videos make me want to get back into it lol.
IDEA: Rideable Giant Wolf 🐺 Mount with a boss fight?
How do you use the visual studio code extension without it flagging everything as red????
getting into datapacking, and seeing examples of stuff like /return is really helpful, ty!!
like. my functions are a bit messy... but im learnin what return does, and what execute store does...
this saved me hours of frustrations 😅
Hey thanks for this! I can make a card game in minecraft using this!
OH MY LORD, I REALLY NEED IT.
THABKS!!!
NO WAYYYYYYYYYYYYY
oh lol i've been using that already im stupid hahah
Thanks, this helped a lot, but how would you check for the value of one variable, not as two separate booleans? For example, X could be 0, 1 or 2. (i’m trying to make a random decision function)
Summary:
#IF
execute (condition) run return (answer)
#ELSE
(another)
condition is like using if or something else like predicates idk
answer is like a command or function, anything
another is the other bits in your file, this can be a IF statement also
btw tysm for telling this 😁 very useful indeed
yes plzzz new UI I have been stuggeling to update your old UI to 1.21 also I was able to change the ender chest stone button on head to a light gray stained glass pane inside the new crafting.slot.0 and everytime someone opens there inventoty and closes it or throws it out it copys it back to the crafting slot, but I am struggeling whith air{drop_contents:1b} cuz whith the new components that nolonger works
this is huge
i have a question, which extensions por VS Code did you use for datapacks creation. I used one, but with the 1.20.5 update, it is not compatible.
return in an execute statement breaks the flow of the script ; is this neat behaviour common to the return command as well, more than the return subcommand of /execute ?
I love this!
Strange how i had a lot of programmed stuff and datapacks that when they got updated to 1.21 stopped to work
All plural names folders were renamed to singular expect a few
can i ask for 1 question? what extension you use in visual code
Read other ppl’s comments
What VS Code plugin do you use for datapacks?
So if i am not mistaken this is just execute unless but 10 times better right?
Ok so if I understand properly, the “run return” end but just like ends the function and does something else?
When return passes, the rest of the function is skipped. You can either run something along with it or use return fail to skip without doing anything
Can we do math with data packs now? I dunno what’s new
I'm curious. How would you go about making a switch case statement ?
i would just use a giant if-elif block like this running a function for each case. not a more effecient way
so if the return command is unsuccessful it will allow the following commands to run as normal but if it runs successfully it will stop the function early?
If you run return it kills the current function. So if you have conditional stuff before running the return command and that conditional stuff fails, of course the command will not run
Comment for the algorithm! #FixTF2
What extension to vs code do you use?
datapack helper and datapack icons, but its just for videos i dont actually use those
Does they work for 1.21 data pack(? Because for 1.21 datapacks it doesn't work @@Cl0udWolf
Is there any program to autoupdate item nbts to components out there?
there might be some, misode's generator can do it but you need to paste each thing in one at a time.
Was return then run always in commands?
been there for a while, maybe 1.18
It was added in 1.20.2
Didn‘t you use sublime text?