How to Compare NBT/Strings in Minecraft

Поделиться
HTML-код
  • Опубликовано: 23 окт 2024

Комментарии • 61

  • @enchanted_games
    @enchanted_games 4 года назад +14

    I didn't even know something like this was even possible with vanilla commands, well Done!

  • @kleingrrmpf
    @kleingrrmpf 4 года назад +5

    Damn, that super smart. Well done

  • @elliejf
    @elliejf 4 года назад +4

    I said out loud "oooh that's really smart" and my sister on another floor heard

  • @Gamiboi612
    @Gamiboi612 4 года назад +1

    i stepped upon this video a while ago, thinking it might be useful in the future, so i saved it down. I'm glad i did that XD

  • @aaronrhodes6770
    @aaronrhodes6770 3 года назад +2

    The hardest thing I can think of is creating an entry in storage for each player, then dynamically matching each player to their respective entry. You can set the player's UUID to a given entry and check for a match, but is there an option that then lets you dynamically target that matching entry (since it can't be targeted like entities can)?

  • @johanneskeischgens8454
    @johanneskeischgens8454 4 года назад +2

    Ah great! I even understood!

  • @goobus_floobus
    @goobus_floobus 4 года назад +1

    That's awesome. Didnt even know about storage

  • @Artistically174
    @Artistically174 4 года назад +5

    Can you do a datapack tutorial for player ids for multiplayer and how you can use the player I'd to give each the same armor stand or something.

    • @Cl0udWolf
      @Cl0udWolf  4 года назад +4

      Minecraft Fanatic maybe. I’ve been meaning to do a minigame tutorial series and that would def need to be covered

    • @Artistically174
      @Artistically174 4 года назад

      That would be nice

  • @TomekTTX
    @TomekTTX 2 года назад

    This was the first result in my Google search and it's exactly what I needed, thanks!

  • @zacharybarbanell1064
    @zacharybarbanell1064 4 года назад +2

    Is the storage argument you've given to data basically just global variables for the minecraft world?

    • @Cl0udWolf
      @Cl0udWolf  4 года назад +1

      It’s global nbt information not really variables per say

    • @zacharybarbanell1064
      @zacharybarbanell1064 4 года назад

      @@Cl0udWolf So would dummy scoreboards still be the best way to store global variables then

    • @Cl0udWolf
      @Cl0udWolf  4 года назад +1

      @@zacharybarbanell1064 if ur storing a number yes

  • @wantor7276
    @wantor7276 4 года назад +1

    Thank you !

  • @Jimi-xw6pl
    @Jimi-xw6pl 4 года назад +5

    Fastest click everrr

  • @Duckless137
    @Duckless137 2 года назад

    Thank you so much!

  • @andrescycloid4542
    @andrescycloid4542 Год назад

    GRANDE AMIGO, ME AYUDO MUCHISIMO

  • @The_Canadiac
    @The_Canadiac 2 года назад

    Very useful, thanks

  • @arandomguy515
    @arandomguy515 4 года назад +1

    Is it possible to open a world to lan using commandblocks bc /publish doesnt work (at least not like in chat) its not to important just thought id be kinda nice that the world around doesnt frezze when you open a BOOK. why mojang?

    • @Cl0udWolf
      @Cl0udWolf  4 года назад +2

      Server commands can’t be run by command blcoks

  • @anamoyeee
    @anamoyeee 4 года назад +1

    ooo new vid!!

  • @vendigo176
    @vendigo176 2 года назад

    я не знаю языка и переводчик не помог, но основную суть я уловил и за это спасибо

  • @lllllllllllll3879
    @lllllllllllll3879 4 года назад +2

    Sad i cant use those commands in pocket edition

  • @samutheoneandonly3876
    @samutheoneandonly3876 3 года назад

    This isn't multiplayer friendly right? If two players compare items at the same time, the system will mess up. Is there a way to make this multiplayer friendly?

    • @Cl0udWolf
      @Cl0udWolf  3 года назад

      It is multiplayer friendly if u run the commands in a sub function as @a prior

    • @samutheoneandonly3876
      @samutheoneandonly3876 3 года назад

      @@Cl0udWolf but won't the storage be overidden when 2 players compare at the same time?

    • @Cl0udWolf
      @Cl0udWolf  3 года назад +1

      @@samutheoneandonly3876 not if the commands r run inside a function and the function is called as @a. it will do all commands in the function seperately per player

    • @samutheoneandonly3876
      @samutheoneandonly3876 3 года назад

      @@Cl0udWolf Aight, thanks dude!! really needed this.

  • @thechampshrimp
    @thechampshrimp 4 года назад

    @Cloud Wolf could u make a clickable entities how-to video?
    Luv ur vids

    • @Cl0udWolf
      @Cl0udWolf  4 года назад +1

      TheChampShrimp villagers that r invisible is the common method

    • @thechampshrimp
      @thechampshrimp 4 года назад

      @@Cl0udWolf thx, i dont know how i didnt guess it myself, thx again, keep up the good work

    • @RyanTosh
      @RyanTosh 4 года назад +1

      @@Cl0udWolf Could you use an invisible armor stand and detect an item swapping in its hands?

    • @fatherwilliam
      @fatherwilliam 4 года назад

      @@RyanTosh you could but a villager is so much better

  • @slava6105
    @slava6105 4 года назад

    is this a crutch (костыль) or a genius idea?

    • @Cl0udWolf
      @Cl0udWolf  4 года назад +1

      Viat Cheslav it’s not a crutch it’s the only way to compare nbt dynamically

    • @slava6105
      @slava6105 4 года назад

      @@Cl0udWolf yes, but it seems like a crutch

    • @Cl0udWolf
      @Cl0udWolf  4 года назад +1

      Viat Cheslav maybe compared to how u do it in java or C but not in MC

    • @slava6105
      @slava6105 4 года назад

      this is truth

  • @ghostgame5338
    @ghostgame5338 4 года назад

    can i compare the content of two dispenser whit this method?

    • @Cl0udWolf
      @Cl0udWolf  4 года назад

      ofc

    • @ghostgame5338
      @ghostgame5338 4 года назад

      @@Cl0udWolf i've tried this method but nothing happens .... i've failed something?
      data remove storage test1 temp
      data modify storage test1 temp set from block -84 60 -38
      execute store success score %bool global run data modify storage test1 temp set from block -84 60 -40
      execute if score %bool global matches 0 run say Matched
      (the version whit the armor stand was working)

    • @Cl0udWolf
      @Cl0udWolf  4 года назад

      Ghost Game u would set it from the blocks Items array

    • @ghostgame5338
      @ghostgame5338 4 года назад

      @@Cl0udWolf i'm new i am new to MC dev, could you give me an example if you have time? (sorry if i'm making u lose ur time)

    • @Cl0udWolf
      @Cl0udWolf  4 года назад

      Ghost Game just add the word Items after block -84 60 -38 and -40

  • @adamantii
    @adamantii 4 года назад +2

    Why would you clear the storage if you're overwriting it anyway

    • @Cl0udWolf
      @Cl0udWolf  4 года назад +1

      If there isn’t a hand item then it will not overwrite anything so it will remember the previous item

  • @Jordanpolitik
    @Jordanpolitik 4 года назад

    minecraft has come a long way with commands. I mean look at this video

  • @GloomBetter
    @GloomBetter 4 года назад

    yo

  • @loading4946
    @loading4946 4 года назад

    REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

  • @Beetless
    @Beetless 4 года назад

    im 12 min late :(

  • @katzenmadchen6183
    @katzenmadchen6183 4 года назад +1

    first :)

    • @Jimi-xw6pl
      @Jimi-xw6pl 4 года назад

      (^o^):-D(^o^):-D(^o^):-D(^o^):-D(^o^)

    • @gravitowl
      @gravitowl 4 года назад

      Really, how do you people sleep at night, knowing everybody hates you for these meaningless spam comments?

    • @gravitowl
      @gravitowl 4 года назад

      @Sploshwazere Hmm, sorry for that im on vacaruon in france and the wifi isn't good here, it gave me An error first time so i tried it again very weird...

    • @gravitowl
      @gravitowl 4 года назад

      @Sploshwazere Yea that's how sad these people are...

    • @Cl0udWolf
      @Cl0udWolf  4 года назад +1

      gravitowl if u are actually actually first u do win

  • @TinyBoba-z5f
    @TinyBoba-z5f Год назад

    Thanks!