Minecraft /execute if PREDICATE [1.19] Command Tutorial

Sdílet
Vložit
  • čas přidán 23. 12. 2020
  • Learn how to use predicates in this Minecraft predicate tutorial for 1.19/1.18/1.17/1.16. If you've ever wondered what /execute if predicate is, then this video is for you! Predicates are a more advanced datapack feature that let you detect very specific things. It could be the answer to How to detect light levels, y level, NBT tags, or even how to detect rain! Predicates are a super useful part of any datapack or command block project!
    Predicate generator: misode.github.io/predicate/
    My datapack tutorial: • How to Make a Datapack...
    Predicate list: minecraft.gamepedia.com/Predi...
    ===l o n k s===
    My Discord Server [ / discord ]
    My Twitch [ / legitimoose ]
    My Editor [ / ciara_millinery ]
    Italian captions provided by KooriKitsune38!
    In this Minecraft predicate tutorial, you'll learn how to use predicates in Minecraft, and how predicates work in datapacks (data packs) and how to detect things in Minecraft 1.16! People always ask how to detect people falling into the void in bedwars, and this is one way to do it! Predicates are super useful to detect light levels, detect rain, detect when a player is sneaking, or detect items in hand. There are so many different uses, and when used in combination with other execute subcommands like /execute if score, and /execute in general, you can do some great things! Predicates are a relatively recent addition to Minecraft, and this tutorial is completely up to date in Minecraft 1.16 (and 1.17!)
  • Hry

Komentáře • 256

  • @GameMaker04
    @GameMaker04 Před 3 lety +61

    Great videos, thank you. Wondering if its possible to use predicates to compare two entities. For example to see if a player is within a cube area around a named armorstand. Not using spherical range but rather see if the player is within a cube volume. I see the location with min and max values but not sure if they can be applied in game in this way.

    • @Legitimoose
      @Legitimoose  Před 3 lety +15

      Hmm, it's certainly an interesting idea! I don't _think_ you could, but I also couldn't completely rule it out without trying. If you find out that it's possible in some way, let me know!

    • @GameMaker04
      @GameMaker04 Před 3 lety +25

      @@Legitimoose well here you go.. predicate is as follows. you can change the distance range to whatever. Below the predicate definition is an example call to it.
      {
      "condition": "minecraft:entity_properties",
      "entity": "this",
      "predicate": {
      "distance": {
      "x": {
      "min": 0,
      "max": 10
      },
      "y": {
      "min": 0,
      "max": 10
      },
      "z": {
      "min": 0,
      "max": 10
      }
      }
      }
      }
      in my world I use an armorstand at spawn to hold many variables as scores and tags. so this example calls the distance check from me the player to that armorstand called "variables"
      execute as @p at @e[name=variables] if predicate sbox:cubedistance run say nearby

    • @Legitimoose
      @Legitimoose  Před 3 lety +32

      @@GameMaker04 YOOOO WHAT I honestly didn't know quite how distance would work but that makes so much sense now that I see it! That is actually awesome, thank you.
      EDIT: pinned because i think people might find this useful, and I totally glossed over it in the video!

    • @Coco-vz6eb
      @Coco-vz6eb Před 2 lety +1

      you could use the dx selector

    • @chickenmanfy
      @chickenmanfy Před rokem

      a

  • @zasharan2
    @zasharan2 Před 3 lety +127

    man, I wish I knew about this before I made a billion scoreboards...

  • @Incommensurableme
    @Incommensurableme Před 3 lety +54

    Because I was bored, i did the math at 5:30.
    from what was on the screen, he showed 7 samples. {9,8,8,6,7,10,10}
    add the array and you get 58.
    then you get the average: 58/7 = 8.2857
    divide the average from the total number of players: 8.2857/16 = ~0.51
    so to anyone who asked the question of "Is it really a 50/50 chance?"
    Yes, yes is.

    • @Legitimoose
      @Legitimoose  Před 3 lety +18

      the hero we need, but not the one we deserve.
      thanks for the high quality comment lmao

    • @ThePersonatour
      @ThePersonatour Před rokem

      Witchcraft language

    • @ataraxianAscendant
      @ataraxianAscendant Před rokem

      LETS GOOO HOMESTUCKFAN GOT THE MOST (tied with colonel sand, hotdog and eggnog)

  • @kl0nos
    @kl0nos Před 3 lety +48

    3 years ago the only commands i knew were /gamemode 1

  • @Eski0069
    @Eski0069 Před rokem +4

    For those that would like to know. When it comes to the performance of NBT selectors vs predicates in @a selectors. Predicates are up to 10x faster than going nbt={...}, so if you need to check NBT of a player predicates are the best option for selectors

  • @RealTinFoil21
    @RealTinFoil21 Před 3 lety +24

    just found your channel a few days ago and subscribed right away. Great content/personality and i love that someone else out there covers commands/data packs (something i’ve wanted to get into!)

  • @uKaigo
    @uKaigo Před 3 lety +25

    Bro, realized you're only 4k, you deserve way more than that

    • @Legitimoose
      @Legitimoose  Před 3 lety +4

      Thanks! I'm gettin' there >;)

    • @degamersspelen6468
      @degamersspelen6468 Před 3 lety +1

      4 months later HE HAS 4x MORE SUBSCRIBERS

    • @uKaigo
      @uKaigo Před 3 lety +1

      @@degamersspelen6468 ikr

    • @Bruzen
      @Bruzen Před 3 lety +1

      @@degamersspelen6468 bro I would think he has 379k subs

  • @zerokun2655
    @zerokun2655 Před 3 lety +5

    Man I'm binge watching your videos.. i, as a programmer, love this kind of stuff.. and not knowing Java I'm grateful that I can just use commands blocks so thank you:)

  • @GreenedBeens
    @GreenedBeens Před 2 lety

    This video and that predicate generator just changed how I do commands FOREVER!! You are amazing, your videos are real helpful!

  • @TheAmazingLeo
    @TheAmazingLeo Před rokem

    Wanted to say thank you, using your videos I managed to create my own simple datapack for what I wanted to do. They were interesting, entertaining and very informative.

  • @zemonsim
    @zemonsim Před 3 lety +2

    Thanks ! Your videos are really helpful ! I will try to make a security system to alert a player if another player enters a restricted area

  • @Bruh-hd4rj
    @Bruh-hd4rj Před 2 lety

    Love your channel!

  • @toamastar
    @toamastar Před 9 měsíci

    Whenever im trying to work out complex command stuff i know legitimoose has got my back! Thanks man, ill try figure this out haha

  • @liorschifrin
    @liorschifrin Před 3 lety

    Dude, amazing video. Just incredible. Like for real, some of the best videos on this platform. Amazingly well put together, well edited, and funny.

    • @Legitimoose
      @Legitimoose  Před 3 lety

      Thanks so much! I'm glad you appreciate what I'm doin here ;^)

  • @plumper303
    @plumper303 Před rokem +1

    MY GOD THIS IS GAME CHANGING THANK YOU!!!

  • @alaniumacity4375
    @alaniumacity4375 Před 3 lety +2

    I didn't realize how useful predicate was until now, feel blessed.

  • @AnimationWar3850
    @AnimationWar3850 Před rokem

    I have Been looking since a long time that how did I select player's on a wide area this helped me a lot 😊

  • @LordJpeg
    @LordJpeg Před 3 lety +1

    as always, amazing video! one day you'll get to 100k and probably even 1mil!

  • @sa-hq8jk
    @sa-hq8jk Před 3 lety +7

    Finally someone who calls it Jason rather than jay s ON

  • @OkikamiNara
    @OkikamiNara Před 3 lety +1

    This is awesome and super useful !!!!

  • @jessegaming502
    @jessegaming502 Před 3 lety

    Dude your channel is so good

  • @evoantimatter
    @evoantimatter Před 2 lety

    this dude is an absolute legend

  • @timmylim1844
    @timmylim1844 Před 3 lety +4

    THANK YUO FOR UPLOADING!!! YOU HAVE HELPED ME SO MUCH

  • @guitaek4100
    @guitaek4100 Před 2 lety

    exactly what I needed, thank you

  • @az-kalaak6215
    @az-kalaak6215 Před 3 lety

    FINALLY, I already feel I will spam this
    Thx for the tutorial :D

  • @exercisss5190
    @exercisss5190 Před rokem

    How to check item in water to change into another item? you so great at explain I love it!

  • @isaacporter359
    @isaacporter359 Před 3 lety

    Another truly epic video

  • @anuarahmad3081
    @anuarahmad3081 Před 3 lety +1

    I hope you make more minecraft tutorial

  • @weisneus
    @weisneus Před rokem

    Hello there, first of all: this video was very helpfull. The only thing I can't find anywhere is how to use the position predicate (so when someone stand at a certain position, a block spawns for example). I know it's been a very a long time since you posted this video, but it's worth a try :)

  • @hqzmatlmfao
    @hqzmatlmfao Před 3 lety +1

    Thx man me and my best friend are making a channel to teach people how to make command weapons and command item battles with my best friend and I'll put credits on some of the videos of you

  • @tehmalayspartan
    @tehmalayspartan Před 3 lety

    Merry Christmas!!!

  • @rolmic
    @rolmic Před rokem

    Thanks fort the tutorial

  • @kidk3251
    @kidk3251 Před 3 lety

    This is a legendary Command ✌️👌

  • @Thatmagicpanda
    @Thatmagicpanda Před 2 lety

    I was using two command blocks to test for sneaking, now I can use one 🤯

  • @ogayu3469
    @ogayu3469 Před 3 lety +2

    I needed this

  • @hexdebt7670
    @hexdebt7670 Před 3 lety

    that DTL music gives me life

  • @Oldgal711
    @Oldgal711 Před 3 lety +1

    This man needs a million subs

  • @IronDragonGroup
    @IronDragonGroup Před 2 lety

    Great video. I'm looking to use the /execute command to try and add airships to the game - sort of like Archimedes Ships but way, way less sophisticated. Any ideas on how I might be able to do this using, say, retextured donkeys with levitation/slow falling effects?

  • @kalesmash1339
    @kalesmash1339 Před rokem

    Thank you polaroid with beachy waves

  • @CarcharodontosaurusSaharicus

    Very helpful

  • @antiyoygame2001
    @antiyoygame2001 Před 3 lety

    THANK YOU

  • @justchillaxe2750
    @justchillaxe2750 Před 3 lety +1

    Dude honestly u are so underrated like u should at least have 1mil subs u are fun to hear and ur tutorials are amazing like making me just happy to hear u are honestly the best youtuber I’ve ever seen think Iam kidding no literally u I love u

  • @bowser3535
    @bowser3535 Před 2 lety

    Love the content! I seem to be having an issue with detecting lore on an item with the predicate file, any suggestions?

  • @jexl1059
    @jexl1059 Před 2 lety +1

    ohhhh i miss the old wiki. please bring it back!

  • @celestialowl8865
    @celestialowl8865 Před 2 lety

    Hey, I had a question:
    I'm looking at making a hide and seek minigame and was looking for the format for detecting a tag in NBT for a predicate. Would appreciate since I can't seem to work it out or find it anywhere. Would even go so far as to appreciate a video on NBT, NBT paths, and editing NBT in the future if you'd be interested in that as well. Thanks for the tutorials man!

  • @blackatgaming7420
    @blackatgaming7420 Před 2 lety

    simply perfect

  • @IronmanGaming
    @IronmanGaming Před 3 lety +2

    This one is very helpfull!

    • @itsjustlogic7232
      @itsjustlogic7232 Před 3 lety +2

      The vid is 8 minutes long you commented 51 minutes ago and the vid was posted 52 minutes ago

    • @itsjustlogic7232
      @itsjustlogic7232 Před 3 lety +2

      @Chicken Nugget I guess you’re right lol

    • @IronmanGaming
      @IronmanGaming Před 3 lety +1

      @Chicken Nugget that is the reason haha

  • @muckguy8336
    @muckguy8336 Před 3 lety

    Hey Legitimoose, I was wondering if you could make a tutorial about enemy aggro and stuff about making mobs attack each other of a specific player, as it would make a great video idea AND it would help me in my medium scale project, in which mobs fight alongside players for victory, there being 2-4 teams!
    If you read this message, you should know that your videos have such high quality and entertainment that you are my favorite Minecraft coding CZcamsr!

  • @C4puch
    @C4puch Před 2 lety

    If I wanted to check, for example, if a player shot a an arrow (which i could check with a scoreboard) AND they are holding a certain item, how would i do that?

  • @kb6358
    @kb6358 Před 2 lety +1

    I am trying to make a data pack where you can hear birds but I want more complex like different birds for each biome and different times of day but how would I do that?

  • @juliancimoca9680
    @juliancimoca9680 Před 3 lety

    Thanks keep up the great work. You are so under-subbed.

  • @MuraK9U
    @MuraK9U Před 3 lety +1

    is there a way for if i hit an entity with an item it aplies a potion effect?

  • @limeslyx-z9453
    @limeslyx-z9453 Před 3 lety

    I wish I had a way to find all these fancy background songs you use like a link to a doc or a spot in the description with the titles

    • @Legitimoose
      @Legitimoose  Před 3 lety +1

      that's a good idea i should do that eventually. my background music is a trade secret but it must be shared

  • @TerryProthero
    @TerryProthero Před 2 lety

    Useful video. Question. Did you do any videos on tags. Not the tag command. That's different. What I mean is that minecraft has tags for things like beds. #minecraft:beds is a json file that has a list of the different kinds of beds. I can then use the clear command to clear all beds from the inventory, for instance, by using that tag. They can also be used in crafting recipes. Like the crafting recipe for making a crafting table uses a tag to refer to any type of plank. That works fine for any tags already built into minecraft. But can I create my own tags for lets say concrete powder? I tried it, and the game ignores any tag I try to create. Is it impossible to add my own tags? Or am I just doing wrong? What folder do they need to be stored in, etc. And I noticed a replace true or false option in some of them. I have no clue what that means or why one might use it. I have already done some work with resource packs and datapacks. But I'm still a bit of newbie at both.

  • @orb2090
    @orb2090 Před 3 lety

    Hello Mr. LegitiMoose, how would I detect a specific entity getting hit by another specific entity? How would I use the "direct_entity" under (damage types) predicate for this if I could? Thanks a million. Happy Holidays!

  • @at_
    @at_ Před 3 lety

    Can you do right click detection with any item? Some ppl won’t be able to install the server resource pack so everyone walking around with carrots on a stick would look weird. I had this idea with invisible armorstands floating in front of the player and detecting if an item was given do some stuff and give it back but I had no idea how to execute it.

  • @fabiacr
    @fabiacr Před rokem

    Hola buenas ¿Podrías dar un ejemplo de un predicate que detecte cuando un jugador entra a un mundo por primera ves?

  • @beepboop9554
    @beepboop9554 Před 3 lety

    When will /data command arrive
    Cause if you explain it I might be able to understand it more / Also Merry Christmas (Eve) depending on your time zone

  • @xboydubose7254
    @xboydubose7254 Před rokem

    How do you make randomization like a dice? For example if you wanted a 33% chance to get nausea, a 33% chance to get levitation, and a 33% chance to get jump boost, how would you do it? I think the normal method would treat those independently, and would have a chance of none of them happening, or multiple of them happening at the same time.

  • @coruscaregames
    @coruscaregames Před 2 lety

    1:58 where is that music from? Is it Chocobo Tales? It feels super familiar

  • @egfloggygoggy
    @egfloggygoggy Před 2 lety

    you are the best

  • @NGNL-tj8su
    @NGNL-tj8su Před 3 lety

    Hey legitermoose could you make a custom advancement tutorial? I have been looking for one on youtube but I can't seem to find one, and its very confusing

  • @archniki_
    @archniki_ Před 2 lety

    i need 2 things
    buildable structure (portal or certain block placed) that will run special command that will be activated if player nearby. for example if build cube 9x9 of diamonds it will kill any players in distance 9.
    other thing is only underground nether portals. is it possible to prevent them from spawning higher than 60. and working higher than 60?

  • @pinklasagna4722
    @pinklasagna4722 Před 3 lety +6

    Hello LegitMoose, i have a question. Can i do commands or trigers with mentions, example: "trigger ban (set) Gamer1337", i just don't want to use cheats on our server with friends and only some of commands will be working. Also i've come up with idea that every played gets theyr own tags, and when you type trigger ban, list of player comes up in a chat by tags, when you click on player, well, it bans them. Sorry for bad english, i'm russian

    • @Legitimoose
      @Legitimoose  Před 3 lety +1

      Hi! You can't use mentions like you said (the general term is "arguments") and you also can't run ban, or op commands from a command block or datapack sadly. I do think this is possible though! You'd just have to come up with another way to choose players (@p, or setting a scoreboard or something). I think your idea with the tags could be possible in some form too! If you have any more questions feel free to ask! (and your english is good!)

    • @pinklasagna4722
      @pinklasagna4722 Před 3 lety

      @@Legitimoose i was kinda predicting that, i thought there would be some kind of "not straight" answer like we are doing custom commands with trigger, but thx for double aprouving. I really hope they add custom commands in datapacks in json, like custom crafting recepie. Thx for your tutorials, i was interested in datapacks and i started learning. When i wrote some "code" i saw that you can write predicate after execute, i didn't bother until this tutorial came out, they actually make everything easier. Your tutorials are the best, everyone quiting datapacks or just bad at explaining, but you're making everything fun and easy to understand. Thx man, subscribe, bell and like! Keep making them, i would like to see things i don't know.

  • @nik9434
    @nik9434 Před 3 lety +3

    Create a tutorial java tutorial? Pleaseeee, like how u making a buckit plugins for u streamer tournament?

  • @lollosmino_6486
    @lollosmino_6486 Před 2 lety

    Is there a way to detect if the entity that is attacking you has certain properties like tags? I am trying to use the condition damage_source_properties but nothing works even if i use a generator to write the file

  • @carldablob324
    @carldablob324 Před 3 lety

    is there a way to make it so its always checking for a player in a location, but when it is true, the run subcommand would only activate once?

  • @luzellemoller6621
    @luzellemoller6621 Před 3 měsíci

    i need help im trying to detect the light ;lefel and if its abofe 6 gife saturation(like plants make food for themself throught fotosintheses)

  • @MP-bt6nv
    @MP-bt6nv Před 3 lety +1

    thx u legit mouse

  • @w_nter0001
    @w_nter0001 Před rokem

    idk if youre answering questions here but i really have no idea what im doing wrong. i follow everything here and followed your datapack tutorial yet for some reason no datapacks work and these predicates wont show up. i have double checked every notation and i cant seem to get this to work

  • @GracjanPawelFilar
    @GracjanPawelFilar Před rokem

    I made a predicate for standing on a bee hive, but when i actually stand on a bee hive it doesn't activate. i made sure the command is written correctly and that the command block is set on repeat and always active. Anyone knows why?

  • @Smiling_RBLX
    @Smiling_RBLX Před rokem

    Hey Legitimoose! I need help in a command, basically, I want a door to open based on the item a player is holding, I'm excellent in bedrock commands but just not in java, I just need a keycard basically, can you write a command here which works! I'd really appreciate it.

  • @idkman7483
    @idkman7483 Před 3 lety

    Thgis is possible for hide and seek right im still new to this whole command thhing

  • @Andromeda42
    @Andromeda42 Před rokem

    These videos have been so imformitive! Thank you. Okay, so I know this video is old, but is it possible for a predicate to be an nbt? I'm trying to create my own nametag Easter egg, like giving an entity a certain name causes something else to happen, ie Jeb_ makes a sheep's wool fade between colors. I'm new to making datapacks so yeah. My logic is that once the nbt "CustomName" is set to a certain name it'll change the nbt "CollarColor" to a certain color. I've done my best to put that in a regular function, but couldn't get it to work. There's a space for nbts in the predicate generator but when I copied the code into the .json file it didn't have correct syntax. It's obvious I don't know what I'm doing lol, so any help would be appreciated.

  • @silverman2594
    @silverman2594 Před 2 lety

    How would I change loot tables for structures?

  • @pickgreenckle3422
    @pickgreenckle3422 Před rokem

    How do i make the result command not happen every tick in a datapack?

  • @swouaggy6796
    @swouaggy6796 Před rokem

    omfg how did i lived without knowing the random one, ITS SO FUCKING COOL WTF

  • @noobguy106
    @noobguy106 Před 3 lety

    You sound like Wilbur Soot. Anyway, I'm a new subscriber! Yey!

    • @Legitimoose
      @Legitimoose  Před 3 lety

      Haha that's a new one. Welcome aboard! I _do_ like wilbur, but most people say I sound like technoblade ;^)

  • @nigeladams8321
    @nigeladams8321 Před rokem

    drawn to life 2 music :)

  • @antiyoygame2001
    @antiyoygame2001 Před 3 lety

    I love you

  • @aviatorgolf658
    @aviatorgolf658 Před 3 lety +1

    Hello LegitMoose, I'm trying to recreate BattleBox from MCC and one of the mechanics is to put a specific wool color in a 3x3 area, I'm having trouble on detecting the wool. Any solutions or predicates?

    • @garrettploetz3970
      @garrettploetz3970 Před 3 lety

      I'm just spit balling here, but you may be able to use an /execute if blocks command in order to test if all of the wool blocks are there

  • @finchman1234
    @finchman1234 Před 3 lety +1

    I’m fairly new to using commands/command blocks. If I want to test out a wither skeleton farm in a creative world before building it in survival and I need to spawn proof the fortress with pressure plates, can a predicate help me with that? I basically need to test nether bricks to see if they have an air block above them, and if so, replace the air with a pressure plate. Nothing I’ve tried has worked yet, and using
    /fill x y z x y z minecraft:stone_pressure_plate replace minecraft:air
    just leaves big stacks of pressure plates everywhere that shouldn’t be possible. I’m completely stumped but I really don’t want to manually place pressure plates in a 256x256 area to spawn proof it all.

    • @trey1326
      @trey1326 Před 3 lety +1

      im a bit late, but you could do /fill sand on the top of the farm and then do /fill stone_pressure_plate replace sand, no need for predicates

  • @dizpicable
    @dizpicable Před 2 lety

    How do you keep players away from a certain place without barriers

  • @venom830
    @venom830 Před 3 lety

    Sir, How to set a command blocks range to infinite in java edition.

  • @lambrosstef
    @lambrosstef Před 2 lety

    Nice video and thank you! Also can you send me a link with the npc mod? i cant find it.

  • @starwy6434
    @starwy6434 Před 3 lety

    hey nice video! Can you make a video about /tag? That would be awesome

    • @Legitimoose
      @Legitimoose  Před 3 lety

      Thanks for the idea! It's goin' on the list!

    • @starwy6434
      @starwy6434 Před 3 lety

      @@Legitimoose Yes! Ive been waiting for that for so long. Thx for the reply, truly awesome

    • @paradox697
      @paradox697 Před 3 lety

      @@Legitimoose Can you also do one where a Predicate triggers when a entity (e.g. an egg) hits another entity (e.g. a villager)

  • @at_
    @at_ Před 3 lety

    Is there a way to clear items that don’t have a tag from someone’s inventory? I’m making a custom game and I have keepinventory on bc I don’t want all their stuff dropping on the ground for others to steal but I want to clear all items that don’t have the soulbound tag.

    • @sa-hq8jk
      @sa-hq8jk Před 3 lety

      I see you in the comments a lot asking about command related questions. If you have questions and you want people to actually answer them then I recommend going to the legitimoose discord under the #help channel.

  • @TOPIKSAJATOPIK
    @TOPIKSAJATOPIK Před 3 lety

    sorry,, but can u make command player just run for 1 block straight direct to x or z way

  • @zasharan2
    @zasharan2 Před 3 lety +4

    Question: Could you detect something such as whether a player is holding the right-click button or something like that?

    • @deathdanger076
      @deathdanger076 Před 2 lety

      Yes

    • @zasharan2
      @zasharan2 Před 2 lety

      @@deathdanger076 how?

    • @deathdanger076
      @deathdanger076 Před 2 lety

      @@zasharan2 with scoreboards, you can detect if a player is using a carrot on a stick. Give that a custom texture and make it unbreakable.. voila

  • @FrodosBeutel
    @FrodosBeutel Před 3 lety +1

    just finished your execute tutorial
    now the only thing missing is /execute store

  • @zasharan2
    @zasharan2 Před 3 lety +1

    I have a question that's not really related to this, but is it possible to set nbt values based on players? For example, if I do
    /summon armor_stand ~ ~ ~ {Team:playerTeam}
    is there some way to make it so that the team that the armor stand joins is the same team the player executing the command is on?

    • @Legitimoose
      @Legitimoose  Před 3 lety +1

      Hi! It should totally be possible! If team is stored as NBT on the player, then you could copy it over using /execute store (which is a bit too complicated for me to type out from memory here) but I bet it can be done! Look into /execute store if you haven't already, and good luck!

    • @zasharan2
      @zasharan2 Před 3 lety +1

      @@Legitimoose ok, thank you so much!

  • @Adrianlesj
    @Adrianlesj Před 3 lety

    hey! how can I check the distance between 2 players and if they are cole enough, run a command? I tried several hours trying to know how

    • @caddymcbutcheryt6733
      @caddymcbutcheryt6733 Před 3 lety

      can you use the tag distance so it would look like (/execute as -player1name- if -player2name-[distance..2] run say activate)

  • @marcellomaramigi7246
    @marcellomaramigi7246 Před 3 lety

    Nice video! One question, would it be theoretically be possible with this command to check if a player has a certain potion effect on him? I'm playing on a server with different teams who all should have different potion effects that obviously get lost when they die. So would it be possible to give them the effect back if they don't have it?

    • @Legitimoose
      @Legitimoose  Před 3 lety +3

      Yes, it would absolutely be possible. Potion effects are stored as NBT data on the player, so you could detect it like that! I think that it would be easier however, if you added the effect constantly (every tick or something), then they would get it as soon as they respawn. It wouldn't be as _optimized_ but I don't think it would be any worse than the alternative. Good luck with whichever way you choose!

    • @marcellomaramigi7246
      @marcellomaramigi7246 Před 3 lety

      @@Legitimoose thank you very much! I'll be testing this out, but since we run a modded server I might rather go for the more optimized version.

  • @TitasBe
    @TitasBe Před 3 lety

    Can you make next tutorial about how to create custom items.

    • @sa-hq8jk
      @sa-hq8jk Před 3 lety

      Go to his discord and put that under # video ideas

  • @finndotbin
    @finndotbin Před 3 lety

    U da man
    Edit:do u know stuff about bedrock edition?

  • @iza0501
    @iza0501 Před 3 lety

    Hey, i'm really confused with something. If i did a command that every block that i walk turns into obsidian, what if i want to turn it back into a normal block again? Like, i walk on a grass block, it turns into a obsidian, i walk on that obsidian and it turns into a grass block AGAIN. is that possible?

    • @KaosFireMaker
      @KaosFireMaker Před rokem

      Spawn an invisible armorstand which holds the block you are replacing at where you make the obsidian. The armorstand has a "lifetime" score which ticks down. When it hits zero, replace the obsidian with whatever the armor stand is holding.
      This may be terrible and there may be much better ways to do this.

  • @443MoneyTrees
    @443MoneyTrees Před rokem

    All we need now is to have a simpler way to make custom crafting recipes using command blocks in the crafting table, then command blocks will be more popular than datapacks and mods

  • @Cxntrxl
    @Cxntrxl Před rokem

    i came here for the command tech knowledge
    i left after vibing to the drawn to life OST for 8 minutes and 19 seconds

  • @SERVEyourMASTER
    @SERVEyourMASTER Před 3 lety +2

    please remember me when you get famous 😰 JK, good video, too hi of IQ speech for me but it has a good vibe to it.

  • @ErynChess
    @ErynChess Před 3 lety

    Is there a way to /kill a SPECIFIC person if that specific person stands on the pressure plate, for example
    Say player A walks across a command block that has a command and it does nothing
    Then play B walks across the same pressure plate but he dies.
    then play C walks across the same pressure plate and nobody dies
    is this possible?

    • @tissue2101
      @tissue2101 Před rokem

      With the random-chance predicate shown in the video, probably yes?