Minecraft /execute if PREDICATE [1.19] Command Tutorial

Поділитися
Вставка
  • Опубліковано 10 лют 2025
  • 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....
    My datapack tutorial: • How to Make a Datapack...
    Predicate list: minecraft.game...
    ===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!)

КОМЕНТАРІ • 264

  • @GameMaker04
    @GameMaker04 4 роки тому +70

    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  4 роки тому +19

      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 4 роки тому +27

      @@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  4 роки тому +34

      @@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 3 роки тому +3

      you could use the dx selector

    • @mathsupercat9021
      @mathsupercat9021 Рік тому

      @@Coco-vz6eb and the dy and dz

  • @chilipotpie1928
    @chilipotpie1928 2 місяці тому +11

    Reminder for anyone coding in 1.21+ : The file he named "predicates" in the video must now be renamed to "predicate" and the same must be done with the "functions" file, renaming it to "function". Just a format change they made recently. Also the pack format number for 1.21.3 is "48" while the pack format number for the new 1.21.4 is "61".

    • @peanut-lmao
      @peanut-lmao Місяць тому +2

      LIFE SAVER

    • @commandblock2804
      @commandblock2804 8 днів тому +1

      I spent half an hour trying to figure out why my predicate didn't show up and even Minecraft Wiki says it's supposed to be "predicates". THANK YOU SO MUCH!!

    • @freziyt223
      @freziyt223 2 дні тому

      I hate this change from mojang, every time i deside to make a datapack i always spend like 15 minutes just figuring out how this thing is named on this version

  • @zasharan2
    @zasharan2 4 роки тому +142

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

  • @RealTinFoil21
    @RealTinFoil21 4 роки тому +25

    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!)

  • @Incommensurableme
    @Incommensurableme 4 роки тому +61

    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  4 роки тому +19

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

    • @ThePersonatour
      @ThePersonatour 2 роки тому

      Witchcraft language

    • @ataraxianAscendant
      @ataraxianAscendant 2 роки тому

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

  • @uKaigo
    @uKaigo 4 роки тому +27

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

    • @Legitimoose
      @Legitimoose  4 роки тому +4

      Thanks! I'm gettin' there >;)

    • @degamersspelen6468
      @degamersspelen6468 3 роки тому +1

      4 months later HE HAS 4x MORE SUBSCRIBERS

    • @uKaigo
      @uKaigo 3 роки тому +1

      @@degamersspelen6468 ikr

    • @Bruzen
      @Bruzen 3 роки тому +1

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

  • @kl0nos
    @kl0nos 4 роки тому +58

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

  • @zerokun2655
    @zerokun2655 3 роки тому +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:)

  • @Eski0069
    @Eski0069 2 роки тому +5

    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

    • @elrtohruhvd
      @elrtohruhvd Місяць тому

      What about @e?

    • @Eski0069
      @Eski0069 Місяць тому

      ​@@elrtohruhvd same thing, @a is pretty much just @e[type=player]

  • @alaniumacity4375
    @alaniumacity4375 4 роки тому +2

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

  • @plumper303
    @plumper303 2 роки тому +1

    MY GOD THIS IS GAME CHANGING THANK YOU!!!

  • @peanut-lmao
    @peanut-lmao Місяць тому

    Thank you SO much, not that anyone asked I’m making an origins-inspired realm for me and my friends to play on! I have made several origins already with just command blocks but I got stuck with detecting if a player on a certain team was below y = 0 and giving said player a certain effect. I can comfortably say that this tutorial has given me the knowledge required to finish my Warden Origin! Many many thanks and a happy new years!

  • @GreenedBeens
    @GreenedBeens 3 роки тому

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

  • @timmylim1844
    @timmylim1844 4 роки тому +4

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

  • @sa-hq8jk
    @sa-hq8jk 4 роки тому +7

    Finally someone who calls it Jason rather than jay s ON

  • @TheAmazingLeo
    @TheAmazingLeo 2 роки тому

    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 3 роки тому +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

  • @toamastar
    @toamastar Рік тому

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

  • @tarruvi
    @tarruvi 3 місяці тому

    I want to say thank you for making this tutorial and explaining how all this works, I've been trying to randomize some attributes for certain mobs and this video helped clear up how I can go about doing that.

  • @woe_27
    @woe_27 3 місяці тому

    this video saved me so so SO much trouble for my cool little JJK world im planning on working on for java

  • @RileyMcKinlay-mn6ew
    @RileyMcKinlay-mn6ew 6 місяців тому +3

    If any of you are starting to go through the comments, wondering why in the world it isn't working for you on 1.21, don't worry I have your solution. Minecraft changed the folder naming conventions for data packs in 1.21 for some reason, so instead of naming your folders "functions" or "predicates", don't make it plural. The path should be .../predicate/detect_sneak.json.

  • @FileTypeJpeg
    @FileTypeJpeg 4 роки тому +1

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

  • @justchillaxe2750
    @justchillaxe2750 4 роки тому +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

    • @Legitimoose
      @Legitimoose  4 роки тому

      :O thanks so much! I'm glad you like them!

    • @justchillaxe2750
      @justchillaxe2750 4 роки тому

      @@Legitimoose omg u replied Iam gonna cry thank u so much!

    • @justchillaxe2750
      @justchillaxe2750 4 роки тому

      @@Legitimoose wow I saw what I typed and wow English XD

    • @Legitimoose
      @Legitimoose  4 роки тому

      @@justchillaxe2750 language is hard i cant judge ;)

    • @justchillaxe2750
      @justchillaxe2750 4 роки тому

      @@Legitimoose Ye true lol

  • @liorschifrin
    @liorschifrin 3 роки тому

    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  3 роки тому

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

  • @ogayu3469
    @ogayu3469 4 роки тому +2

    I needed this

  • @weisneus
    @weisneus Рік тому

    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 3 роки тому +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

  • @jexl1059
    @jexl1059 3 роки тому +1

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

  • @OkikamiNara
    @OkikamiNara 4 роки тому +1

    This is awesome and super useful !!!!

  • @Animation_War.64
    @Animation_War.64 2 роки тому

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

  • @jessegaming502
    @jessegaming502 4 роки тому

    Dude your channel is so good

  • @evoantimatter
    @evoantimatter 3 роки тому

    this dude is an absolute legend

  • @Bruh-hd4rj
    @Bruh-hd4rj 2 роки тому

    Love your channel!

  • @Thatmagicpanda
    @Thatmagicpanda 3 роки тому

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

  • @az-kalaak6215
    @az-kalaak6215 4 роки тому

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

  • @IronmanGaming
    @IronmanGaming 4 роки тому +2

    This one is very helpfull!

    • @itsjustlogic7232
      @itsjustlogic7232 4 роки тому +2

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

    • @itsjustlogic7232
      @itsjustlogic7232 4 роки тому +2

      @Chicken Nugget I guess you’re right lol

    • @IronmanGaming
      @IronmanGaming 4 роки тому +1

      @Chicken Nugget that is the reason haha

  • @AkspertLemon
    @AkspertLemon 6 місяців тому

    Super Helpful ❤❤

  • @anuarahmad3081
    @anuarahmad3081 4 роки тому +1

    I hope you make more minecraft tutorial

  • @hexdebt7670
    @hexdebt7670 3 роки тому

    that DTL music gives me life

  • @Pure_Skillz
    @Pure_Skillz 7 місяців тому

    "When should you use a predicate, well, when you want to do something only a predicate can do", yeah, no shit sherlock, that's why I'm watching.
    Love your videos though, I watch the tutorials over again for fun that's how good they are.

  • @isaacporter359
    @isaacporter359 4 роки тому

    Another truly epic video

  • @TerryProthero
    @TerryProthero 2 роки тому +1

    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.

  • @MP-bt6nv
    @MP-bt6nv 4 роки тому +1

    thx u legit mouse

  • @guitaek4100
    @guitaek4100 3 роки тому

    exactly what I needed, thank you

  • @Oldgal711
    @Oldgal711 4 роки тому +1

    This man needs a million subs

  • @swouaggy6796
    @swouaggy6796 2 роки тому

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

  • @tehmalayspartan
    @tehmalayspartan 4 роки тому

    Merry Christmas!!!

  • @kidk3251
    @kidk3251 4 роки тому

    This is a legendary Command ✌️👌

  • @Paul-Marmet
    @Paul-Marmet 4 роки тому

    Im barely 2 minutes in and this already useful
    the first part would have been useful a few months ago
    5:50 ARE YOU SERIOUS
    I LITERALLY NEEDED THIS INFO like a few days ago, guess im gonna re write it

  • @Boolin_Brennan
    @Boolin_Brennan 4 роки тому +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.

  • @exercisss5190
    @exercisss5190 2 роки тому

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

  • @Cxntrxl
    @Cxntrxl 2 роки тому

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

  • @nik9434
    @nik9434 4 роки тому +3

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

  • @kalesmash1339
    @kalesmash1339 Рік тому

    Thank you polaroid with beachy waves

  • @rolmic
    @rolmic 2 роки тому

    Thanks fort the tutorial

  • @443MoneyTrees
    @443MoneyTrees 2 роки тому

    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

  • @juliancimoca9680
    @juliancimoca9680 4 роки тому

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

  • @muckguy8336
    @muckguy8336 4 роки тому

    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 UA-camr!

  • @blackatgaming7420
    @blackatgaming7420 3 роки тому

    simply perfect

  • @kb6358
    @kb6358 3 роки тому +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?

  • @limeslyx-z9453
    @limeslyx-z9453 4 роки тому

    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  4 роки тому +1

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

  • @antiyoygame2001
    @antiyoygame2001 4 роки тому

    THANK YOU

  • @SakanaKuKuRu
    @SakanaKuKuRu 3 роки тому

    Fundy: Literally makes you trip when you walk and spits out your inventory

  • @pinklasagnamemes
    @pinklasagnamemes 4 роки тому +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  4 роки тому +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!)

    • @pinklasagnamemes
      @pinklasagnamemes 4 роки тому

      @@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.

  • @nzuum
    @nzuum 4 роки тому

    hello i am now a notification in your phone hello moose

  • @noobguy106
    @noobguy106 3 роки тому

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

    • @Legitimoose
      @Legitimoose  3 роки тому

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

  • @nigeladams8321
    @nigeladams8321 2 роки тому

    drawn to life 2 music :)

  • @egfloggygoggy
    @egfloggygoggy 3 роки тому

    you are the best

  • @celestialowl8865
    @celestialowl8865 3 роки тому

    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!

  • @jaypay3426
    @jaypay3426 4 роки тому +2

    "Ive been legitimoose..."
    then who is the new legitimoose...

  • @IronDragonGroup
    @IronDragonGroup 2 роки тому

    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?

  • @bowser3535
    @bowser3535 3 роки тому

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

  • @starwy6434
    @starwy6434 4 роки тому

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

    • @Legitimoose
      @Legitimoose  4 роки тому

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

    • @starwy6434
      @starwy6434 4 роки тому

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

    • @paradox697
      @paradox697 4 роки тому

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

  • @beepboop9554
    @beepboop9554 4 роки тому

    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

  • @mrhitech6742
    @mrhitech6742 10 місяців тому

    Bro really just called JSON files difficult to write smh my head
    Nah but in all seriousness thanks. This was a really helpful tutorial!

  • @angelluvslots
    @angelluvslots 4 роки тому

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

  • @zasharan2
    @zasharan2 4 роки тому +4

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

    • @deathdanger076
      @deathdanger076 3 роки тому

      Yes

    • @zasharan2
      @zasharan2 3 роки тому

      @@deathdanger076 how?

    • @deathdanger076
      @deathdanger076 3 роки тому

      @@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

  • @MuraK9U
    @MuraK9U 4 роки тому +1

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

  • @trerouploads8169
    @trerouploads8169 9 днів тому

    life saver

  • @Zaluuk
    @Zaluuk Рік тому

    5:40 I always used command like
    /execute at @a positioned ~ 0 ~ run tp @a[dx=0,dz=0,dy=59] 0 0 0
    for y level check

  • @tamed965
    @tamed965 2 роки тому

    Everyone: *Watchin The Video*
    Me: "HE SPELLED /SCOREBOARD WRONG IN THE BACKGROUND"

  • @coruscaregames
    @coruscaregames 3 роки тому

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

  • @C4puch
    @C4puch 3 роки тому

    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?

  • @xboydubose7254
    @xboydubose7254 Рік тому

    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.

  • @DimitteAmare
    @DimitteAmare 4 роки тому

    please remember me when u get famous

  • @fabiacr
    @fabiacr 2 роки тому

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

  • @NGNL-tj8su
    @NGNL-tj8su 4 роки тому

    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

  • @antiyoygame2001
    @antiyoygame2001 4 роки тому

    I love you

  • @lambros_stef
    @lambros_stef 3 роки тому

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

  • @Andromeda42
    @Andromeda42 2 роки тому

    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.

  • @archniki_
    @archniki_ 3 роки тому

    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?

  • @at_
    @at_ 4 роки тому

    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.

  • @TheGodlyKratos
    @TheGodlyKratos Рік тому

    Too bad I'm challenging myself to build a bossfight without using data packs, I'm starting to go crazy now

  • @orb2090
    @orb2090 4 роки тому

    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!

  • @marcellomaramigi7246
    @marcellomaramigi7246 4 роки тому

    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  4 роки тому +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 4 роки тому

      @@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.

  • @finchman1234
    @finchman1234 3 роки тому +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 3 роки тому +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

  • @alon3669
    @alon3669 3 роки тому

    if you want to detect the y lvl there is much better way to do that the way is:@e[y=-1,dy=60] and

  • @Jay1717_
    @Jay1717_ 2 роки тому

    hotdog had like 80% win rate

  • @IcyPiq
    @IcyPiq 4 роки тому +2

    challenge: Make A In-Game Event like The Single Command Block of the world Destroying Creating Chaos And An Epic Black Hole Appears And Swoops The Players In It Going To Another Dimention meeting A Boss Then Defeating It Then Returning To Its Static State, I know That Sounds Crazy But It Worths A While
    and needs EPIC Music ,(and can get u some subs :) )

  • @zasharan2
    @zasharan2 4 роки тому +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  4 роки тому +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 4 роки тому +1

      @@Legitimoose ok, thank you so much!