I really wish a lot of this "under the hood" stuff that came in Minecraft updates got more attention. People really overlook the crazy applications of all this stuff. Imagine if we were still in the Adventure/Puzzle Map era this would go insane.
Hey, so i have a little problem with updating my commands. I used to have a command, which helped me with right click detection. execute as @a[scores={TT_Item_Used=1..},nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{Sword1:1b}}}] I know there are better ways to do that, but i used it already all over the place. Now i have no idea how i could use the new custom_data with that instead of tag? Edit: I already tried this: execute as @a[scores={TT_Item_Used=1..}] if items entity @s weapon.mainhand minecraft:carrot_on_a_stick[custom_data={Sword1:1b}] run @s ... but the problem is that the @s does not work, probably because it isnt executed by that person, just by the item.
its been a while since I've looked at the new commands: I just put your problem into MCStacker.net and this is the syntax you're looking for (1.21.3 mc version btw): /execute as @a[scores={TT_item_used=1..},nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",count:1,components:{"minecraft:custom_data":{Sword1:1b}}}}]
When creating a custom recipe, can I leverage the NBT for the required items? So for instance I would check for an iron ingot with custom model data, thus registering only custom items for a custom recipe? Or like a custom NBT tag.
as of right now, custom crafting with custom items in the recipe are not possible, hopefully it will be added in the future tho. We can only give custom components to the reward item
This is the new 1.21 format for the command /give @p iron_chestplate[attribute_modifiers=[{id:"gravity",type:"generic.gravity",amount:-0.08,operation:"add_value",slot:"chest"}]] 1
@@obamngaaa they've been changing the format alot, the best way to stay updated on the format (lazy way) is just use MCStacker.net and put in the command there (for 1.21.3 mc version the command syntax is: /give @p iron_chestplate[attribute_modifiers=[{id:"gravity",type:"gravity",amount:-0.08,operation:"add_value",slot:"chest"}]] 1
Do you know how to edit the advancement NBT data using command blocks? For example, I want to remove all advancements from players with a specific advancement, and I have a start with “advancement revoke @a[advancements={“ but I have no clue where to go from that
@@infamousjam4335 Thank you so much! I'm making an obstacle course and the finish is going to have the rare advancement sound because playsound doesn't have it for whatever reason, so I want to grant the advancement and then remove it after the sound plays
/give @p iron_sword[attribute_modifiers=[{type:"player.entity_interaction_range",name:"player.entity_interaction_range",amount:5,operation:"add_value",uuid:[I;-1963342012,-1368045824,-2135557449,702557420],slot:"mainhand"}]] 1 you can change the amount value to whatever number you need
Do you know how to summon a villager that sells enchanted books? (I'm trying to get them to sell books with various enchantments, but I can't seem to get the enchantments on them.)
/summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"minecraft:emerald",count:1},sell:{id:"minecraft:enchanted_book",count:1,components:{"minecraft:stored_enchantments":{levels:{"minecraft:fire_protection":1}}}}}]}} Its important to note, you need stored enchantments and not enchantments, the easiest way to write these is with mcStacker.net
I really wish a lot of this "under the hood" stuff that came in Minecraft updates got more attention. People really overlook the crazy applications of all this stuff. Imagine if we were still in the Adventure/Puzzle Map era this would go insane.
Oh for sure, Surprised it took them this long to add this
Hey, so i have a little problem with updating my commands.
I used to have a command, which helped me with right click detection.
execute as @a[scores={TT_Item_Used=1..},nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{Sword1:1b}}}]
I know there are better ways to do that, but i used it already all over the place. Now i have no idea how i could use the new custom_data with that instead of tag?
Edit: I already tried this:
execute as @a[scores={TT_Item_Used=1..}] if items entity @s weapon.mainhand minecraft:carrot_on_a_stick[custom_data={Sword1:1b}] run @s ...
but the problem is that the @s does not work, probably because it isnt executed by that person, just by the item.
its been a while since I've looked at the new commands: I just put your problem into MCStacker.net and this is the syntax you're looking for (1.21.3 mc version btw):
/execute as @a[scores={TT_item_used=1..},nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",count:1,components:{"minecraft:custom_data":{Sword1:1b}}}}]
When creating a custom recipe, can I leverage the NBT for the required items? So for instance I would check for an iron ingot with custom model data, thus registering only custom items for a custom recipe? Or like a custom NBT tag.
as of right now, custom crafting with custom items in the recipe are not possible, hopefully it will be added in the future tho. We can only give custom components to the reward item
what is the full command you used to get the gravity chestplate?
This is the new 1.21 format for the command
/give @p iron_chestplate[attribute_modifiers=[{id:"gravity",type:"generic.gravity",amount:-0.08,operation:"add_value",slot:"chest"}]] 1
@@infamousjam4335 I copy and pasted it and it's in red text
@@obamngaaa they've been changing the format alot, the best way to stay updated on the format (lazy way) is just use MCStacker.net and put in the command there (for 1.21.3 mc version the command syntax is:
/give @p iron_chestplate[attribute_modifiers=[{id:"gravity",type:"gravity",amount:-0.08,operation:"add_value",slot:"chest"}]] 1
Do you know how to edit the advancement NBT data using command blocks? For example, I want to remove all advancements from players with a specific advancement, and I have a start with “advancement revoke @a[advancements={“ but I have no clue where to go from that
/execute if entity @p[advancements={minecraft:story/mine_stone=true}] run say hi
@@infamousjam4335 Thank you so much! I'm making an obstacle course and the finish is going to have the rare advancement sound because playsound doesn't have it for whatever reason, so I want to grant the advancement and then remove it after the sound plays
@@M1dGDK1d playsound does have the rare sound, the name is just weird
/playsound minecraft:ui.toast.challenge_complete
@@infamousjam4335 Oh lmao. Toast is an interesting category to put it in, but that will make it much simpler! Thank you again!
Hello how to make rightclick detection to trigger a command in 1.20.5?
i will be making a tutorial on this shortly
how can i make the entity interaction range command
/give @p iron_sword[attribute_modifiers=[{type:"player.entity_interaction_range",name:"player.entity_interaction_range",amount:5,operation:"add_value",uuid:[I;-1963342012,-1368045824,-2135557449,702557420],slot:"mainhand"}]] 1
you can change the amount value to whatever number you need
Do you know how to summon a villager that sells enchanted books? (I'm trying to get them to sell books with various enchantments, but I can't seem to get the enchantments on them.)
/summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"minecraft:emerald",count:1},sell:{id:"minecraft:enchanted_book",count:1,components:{"minecraft:stored_enchantments":{levels:{"minecraft:fire_protection":1}}}}}]}}
Its important to note, you need stored enchantments and not enchantments, the easiest way to write these is with mcStacker.net
@@infamousjam4335 Bro thx so much
Do you know how to get invisible item frames in 1.20.5
/give @p item_frame[entity_data={id:"minecraft:item_frame",Invisible:1b}] 1
Thanks
@@infamousjam4335normall frame
Good video but -0.1 isn't higher than -0.08
yea spoken error, you get the point
I hate the new command nbt thing bro
yea it definitely takes getting used to, but i think the new changes are making it worth