I don't mod, make data packs, or make maps for minecraft, but here I am, watching this full video, and absorbing the information as though I'll ever use it
The simplest fix to the ender eye method is to give it a custom NBT tag (sidenote: the item is an "ender_eye" and the entity is an "eye_of_ender"). 1. Give the player the custom ender_eye item: give @s minecraft:ender_eye{myCustomEye:1b} 2. Add an nbt condition to the advancement criteria (ensure you have a comma in the line just before nbt): In advancements/eye.json: { "criteria": { "requirement": { "trigger": "minecraft:using_item", "conditions": { "item": { "items": [ "minecraft:ender_eye" ], "nbt": "{myCustomEye:1b}" } } } }, "rewards": { "function": "tutorial:eye" } } 3. Add a command to kill only the eye_of_ender entity with that nbt tag: In functions/eye.mcfunction: advancement revoke @s only tutorial:eye kill @e[type=minecraft:eye_of_ender,nbt={Item:{tag:{myCustomEye:1b}}}] 4. (Optional) If the player is not in creative mode, replace the consumed ender_eye item in their hotbar slot
I thought this woundnt work because, why would the entity have the same nbt as the item? I tested it just to be sure and it does work, the reason i got by thinking 2 seconds is that the eye drops itself, thats why it inherits the nbt, so the eye you throw and the one you recieve are identical
@@HyperKNF Not every usable item if you count instantaneous use as a use, because the using_item advancement trigger only detects items that have a continuous use
WAKE UP EVERYONE! A new method just dropped (in snapshot 24w12a for version 1.20.5): Set your item component to food and set the eating time to 1 of 2 options. 3.4e38 - maximum float value, it disables the eating animation and eating particles. 0.001 - infinitely eating, food particles show. The component: > minecraft:food={nutrition:0,saturation_modifier:0,can_always_eat:true,eat_seconds:3.4e38} then you can simply detect it with "using_item" advancement
In 1.18.2, you can change data/minecraft/tags/worldgen/structure/eye_of_ender_located.json via datapack and set it to: { "replace": true, "values": [ ] } it lets you do this in a dimension which includes a stronghold and still lets you /locate it only downside is the vanilla eye of enders can't find the stronghold
Thanks for the concise guide to all options with their upsides and drawbacks! I just tried the Ender Eye method on my existing world and surprisingly it worked a lot slower than the carrot on a stick method, I suspected it was to do with poor optimization on my part so I tested it on a separate part and that was definitely the case. Well, I have no idea what may be interfering with that so I guess it's time to rip my old datapack apart and start from scratch I guess...
Great video! Though it's worth mentioning: Rather than using ' if score ', you can just run the command you want but use @a[scores={carrot=1..}] . Checking for scores in a target selector is more efficient than in executive if. It won't make much difference lag wise, but if you have a large datapack it's worth doing :)
the Carrot on a Stick method works with any item that has a right-click function, but it ALSO works on consumables, tools or anything that consumes durability. while it may not be as versatile as the Advancement method, its perfect for doing things like making a sword that causes lightning to strike every time you hit a mob, or a pickaxe that detonates TNT a few blocks in front of you every time it breaks a block. its also really easy to set up without using data packs, which are still a hassle for people unfamiliar with programming or who just want to do something simple.
here's the thing: I came across this looking for a way to detect when a player uses a heart consumable or revive consumable so disappearing automagically after using it is perfect. Especially paired with a little /kill @e magic specifically for the ender_eye while it's within a block of the player.
I learned a lot from Dragnoz' tutorials back when scoreboards were added to the game ;^) Then I pretty much just kept up to date with each new update, and pretty soon commands had gotten huge. Also, learning programming in general helps a lot. There's a lot of things you can cross-apply. Thanks for the suggestion ;^)
@@Legitimooseman i know c# (similar to java) But Minecraft datapacks are its own unique confusing thing I dont understand datapacks and seleciting and @ One thing im thinking of is making a programming language that compiles to Minecraft datapacks But idk how doable it is
you also forgot detecting rightclicks on a specific block using items, the advancement is “item used on block” or something like that, i used it for a kit selection a while back and it works pretty well, sadly you can’t check when a player clicks on air, it has to be on a block, but it works without holding an item so that’s pretty cool
There are some fixes for the ender eye method to make it work with strongholds: 1) Replace item in player's hand with (customized) ender eye right after right click detected 2) Kill all ender eye entities in a certain radius after click detected 3) (optional) Check for a block which the player is looking at the moment of click (trace or any other method) and replace it with an empty portal frame if the filled end portal frame is detected earlier
Just give the eye of ender a custom tag, and constantly /kill all thrown eyes of ender with that tag. You can also set it up so that if a player throws an eye with that tag, they are immediately given a new one. Might be some jitters in the instant after throwing it, but honestly, aside from that, it is the perfect method.
Thank you, it's very rare to see different method compilation videos. I know a lot of these but have to think of them from scratch and a discussion of them all and pros/cons is an excellent review and super helpful.
Maybe you could make like a random number generation tutorial. Since its pretty useful :^) Amazing video btw. Never knew you could use fungi for the right click detection, I will be sure to use that!
About the last part, it could actually work in plain survival if you set to the eye of ender a scoreboard "timer" to detect an eye of ender's time, so at some point you'll regain the eye of ender. Though that'll need 3 more commands. But, it won't give you an other item if there aren't any other strongholds around, so that way you can make it work easily. And else what can be done is a toggle function to the previous 3 commands, so they only will work when needed. In case you need some more detail, I can then somehow help out with it.
I spent a while time trying to figure out right click detection in december of 2020 (figured it out tho) and now he posts a video about it. well, at least it will be helpful to other people. Also you have some of the best command block tutorials I've seen on youtube!! Great job!!!
There is a video by someone named conure where he runs a command that basically makes it so you can eat the item but if you set the eat time to a really high amount it doesn't play the animation
Then you'll be happy to know that 1.20.6 contains even more ways to create whatever you want! I recommend searching for ways to use the new datapack and command stuff, they're too many to explain in a reply.
Is there a way to counter the "slowness effect" that you recive while holding the Ender Eye trought datapack? I've tries with command blocks but they are top slow to detect when i stop using It so i get super-fast for half of a second before returning to my normal speed
You could also use snowballs for right-click detection. Just tag the snowball and when you chuck it, kill the snowball entity and give the snowball back, whether by /give or /item. You could do this with eggs and ender pearls as well!
I love the fact that you recognized that some ppl don't use right click, I use left click lol (my brain got washed from left is place from bedrock before i got a pc)
For any Bedrock edition players out there I found a way to do it as well. So have a repeating command block that teleports an invisible armor stand to the player. Then have a command block testing if the player has the item to be clicked in their inventory. when they right click, the item will go to the armor stand and the command block will detect that the item is missing, thus triggering the desired command. Another alternative is to get rid of the armor stand bit and make the player have to drop the item to trigger it. This the interaction is a bit easier for phone players. Hopefully this is helpful and pls like so other PE players can see this.
There is a way to use the ender eye in survival and eggs, snowball, and ender pearls. The only problem is that you have to have 2 of the same item. You have 2 snowballs, you throw one, and now you have 1 snowball. You give yourself 1 snowball, you have 2 again, then you kill the snowball. So you detected that you threw the snowball (right clicked) and you can do it again
There is another limitation to the ender eye method people should be aware of, when you use it you can no longer sprint, unlike with the carrot on a stick
ah man. ender eye won't work in survival??? :( but hey, i can use the villager talk advancement and now i know how to reset it! that actually cleared up so many things for me! thank you for making this video!
You could just additionally run a command to kill the summoned eye of ender when clicking. A right click detecting item, that consumes itself, can even be pretty usefull in some cases.
and using resource packs, you can use custom model data to make it look like other items, and you can just rename the items so it’ll look like whatever you want it to
Hi legitimoose! Love your content! Im here from the beginning ! , I would like if you make a video about Item Modifiers and Data command - Not enough information in this section of minecraft commands, And you are the only one who can do it the best!
if you execute as @a[scores={eye=1..},predicate=namespace:holding_eye_with_nbt] at @s run kill @e[type=ender_eye,sort=nearest,limit=1,distance=..2] then you can still use normal ones :)
You can actually make right click detection on eyes of ender work if you kill the nearest eye of ender when you have the score then kill the eye of ender item I have not tested this in game but it probably works.
Moose, I need to know, how do you shoot arrows in a direction you look, like a short bow, you right-click the command detects it, and then an arrow maybe three shoot off in the direction you're looking. Please I beg of you I need to know
this is actually very difficult, you have to calculate the motion of the arrow using the players rotation as a vector. This method also requires lot of data/scoreboard knowledge, how to save/apply scoreboard data etc
How do I use the on-a-stick method with specific nbt tags? i want to have multiple carrots on a stick in my pack that do different things but im not sure how to bind them to specific functioins
how to know what player put the item in an armor stand you could use an advancement to detect when someone right clicks an armor stand using the minecraft:player_interacted_with_entity criteria, make the reward a raycast function to detect which armor stand you clicked (or make it a function that runs a raycast after running something to the player) { "criteria": { "requirement": { "trigger": "minecraft:player_interacted_with_entity", "conditions": { "entity": [ { "condition": "minecraft:entity_properties", "predicate": { "type": "minecraft:armor_stand" } } ] } } }, "rewards": { "function": "subscribe.to:legitimoose" } } and then in the raycast function you could check for the item, and now you know who clicked boom life hack i remember using a system like this for a custom item pickup system
New way to do it without datapack - *execute as @p if score @p carrot matches 1 run say hi* Now add a chain command block with *scoreboard players reset @p carrot*
Another method I use is item frames. You detect when a player is near one and rotates it. Like this execute at @a if entity @e[type=item_frame,nbt={Item:("minecraft:paper", Count:1b)}, distance=..3] store success @p scoreboard_objective_here run data merge entity @e[type=item_frame,nbt{Item:("minecraft:paper", Count:1b)}, distance=..3,nbt={ItemRotation:1b},limit=1] {ItemRotation:0b} Pared with this command. execute at @e[type=item_frame,nbt={Item:("minecraft:paper", Count:1b)}] if entity @a[distance=3..] run data merge entity @e[type=item_frame, limit=1, distance=0,nbt={ItemRotation:1b}] {ItemRotation:0b} Put both inside your tick function. On every item frame you want to have be clickable use this command on them. data merge entity @e[type=item_frame,limit=1, distance=..1] {Invulnerable:1b} Note: this was written on a phone, double check for errors. Also I use a lot of redundant entity calls as opposed to @s, I do this because sometimes @s brakes.
I can now make datapacks! I made a custom recipe for powder snow and teams you can join from a book like NoDeathMessages Team for mini games where death messages are important all inspired by legitimoose thanks :D And you should make shorts too like explaining /trigger and how useful it is
Im making a map with shops, and to purchase from the shops you need to click a button for a series of commandblocks to run. I was wondering if there is a way to detect who pressed a button, because Id hate to use the @p that is closest to the button. I tried to look into scoreboard objectives, and into UUID, but couldnt find anything that would help me. You, Legitimoose, seem like the guy who would know how to make such a thing work, and Id really appreciate it if you could help me out.
@eacerca12 But how would I detect who pressed the button? That's the problem I'm having. Normally people would do @p (the closest player) to the button, but what if there is already a player between you and the button? It would run the command on the other player since he is closer to the button, no matter if its an advancement command or a scoreboard.
I've been trying to find a way to do this stuff with only command blocks for ages now... now I realize I'm trying to do the impossible. Guess its finally time to bite the bullet and learn how to make datapacks.
I have a video idea, or rly just a question cause idk if you could make a whole vid on it, but how do you make a random chance generator that has a chain of commands for each number? Like, let’s say a 1-20 chance, where 1 would deal one damage to the player, two would deal two, etc. The only way I know right now of making that sort of thing is armor stand randomizers (execute at @e[tag=randomchance,limit=1,sort=random) run setblock ~ ~-1 ~ redstone_block, with command blocks under the redstone block) but that’s physical and I can’t figure out how to change it into a data pack. Maybe would I use a random chance predicate or something?
Personally for RNG... I always just use other people's RNG datapacks ;^) Cloud wolf has got a really nice datapack that can generate a random number in the range of your choosing using a nice pseudorandom algorithm thingy. Honestly can't recommend it (and his video about it) enough! Very useful stuff and I'd just butcher it if I explained it in this comment lol
@@Legitimoose amazing, thanks! I was thinking about how to make a pseudorandom thing cause I just saw your video on how to do things like multiplication and division with scoreboards, then you responded lol.
Hey legitmoose, do you know why when i moved my datapacks from 1.16.5 to 1.17.. all my tick.json functions were not triggering? They worked perfectly in 1.16 and ive heard other people with the same issue
I don't mod, make data packs, or make maps for minecraft, but here I am, watching this full video, and absorbing the information as though I'll ever use it
Its always fun learning regardless though, knowing things exist means you could go back if you ever need the information
The simplest fix to the ender eye method is to give it a custom NBT tag (sidenote: the item is an "ender_eye" and the entity is an "eye_of_ender").
1. Give the player the custom ender_eye item:
give @s minecraft:ender_eye{myCustomEye:1b}
2. Add an nbt condition to the advancement criteria (ensure you have a comma in the line just before nbt):
In advancements/eye.json:
{
"criteria": {
"requirement": {
"trigger": "minecraft:using_item",
"conditions": {
"item": {
"items": [
"minecraft:ender_eye"
],
"nbt": "{myCustomEye:1b}"
}
}
}
},
"rewards": {
"function": "tutorial:eye"
}
}
3. Add a command to kill only the eye_of_ender entity with that nbt tag:
In functions/eye.mcfunction:
advancement revoke @s only tutorial:eye
kill @e[type=minecraft:eye_of_ender,nbt={Item:{tag:{myCustomEye:1b}}}]
4. (Optional) If the player is not in creative mode, replace the consumed ender_eye item in their hotbar slot
I thought this woundnt work because, why would the entity have the same nbt as the item?
I tested it just to be sure and it does work, the reason i got by thinking 2 seconds is that the eye drops itself, thats why it inherits the nbt, so the eye you throw and the one you recieve are identical
I will be using this, thank you. It is greatly appreciated.
@@Thatnormalted the eye entity also uses the same texture as the item u held before
HOLD ON, YOU CAN GIVE ITEMS CUSTOM NBT DATA???
You can use a shield instead of an eye of ender to get it working in worlds with strongholds
or actually virtually any usable item
@@HyperKNF Not every usable item if you count instantaneous use as a use, because the using_item advancement trigger only detects items that have a continuous use
you're tutorials are literately the only ones that help me with anything
WAKE UP EVERYONE!
A new method just dropped (in snapshot 24w12a for version 1.20.5):
Set your item component to food and set the eating time to 1 of 2 options.
3.4e38 - maximum float value, it disables the eating animation and eating particles.
0.001 - infinitely eating, food particles show.
The component:
> minecraft:food={nutrition:0,saturation_modifier:0,can_always_eat:true,eat_seconds:3.4e38}
then you can simply detect it with "using_item" advancement
In 1.18.2, you can change data/minecraft/tags/worldgen/structure/eye_of_ender_located.json via datapack and set it to:
{
"replace": true,
"values": [
]
}
it lets you do this in a dimension which includes a stronghold and still lets you /locate it
only downside is the vanilla eye of enders can't find the stronghold
Hello Mr. moose, your tutorials are the best on RUclips!
My Datapack gets filled more and more!
Finally, he remembered his RUclips password.
*It's been so long since he posted: 2 Months to be exact*
You're a life saver with these tutorials. You helped me make a 2 week, 3v3 Heros vs Villains server and it's super cool!
You have the best tutorials ever!
Ikr the best!!!
Actually he inspired me to make my first data pack and publish it to planetminecraft.. Just an Amazing youtuber..!
finally another video, been waiting for this knowledge! still, great youtuber and i'm proud of being here from close to the beginning!
Thanks for the concise guide to all options with their upsides and drawbacks!
I just tried the Ender Eye method on my existing world and surprisingly it worked a lot slower than the carrot on a stick method, I suspected it was to do with poor optimization on my part so I tested it on a separate part and that was definitely the case. Well, I have no idea what may be interfering with that so I guess it's time to rip my old datapack apart and start from scratch I guess...
You probably have too much stuff in loop/tick.mcfunction.
You uploaded a video about this topic right when I needed it. Thank you sooo much!
Great video! Though it's worth mentioning:
Rather than using ' if score ', you can just run the command you want but use @a[scores={carrot=1..}] . Checking for scores in a target selector is more efficient than in executive if. It won't make much difference lag wise, but if you have a large datapack it's worth doing :)
nie?
można to na spokojnie użyć w @a[scores={}] jak i w if score...
@@GameFloWM sorry i would reply but i don't understand what google translate is saying :/
the Carrot on a Stick method works with any item that has a right-click function, but it ALSO works on consumables, tools or anything that consumes durability.
while it may not be as versatile as the Advancement method, its perfect for doing things like making a sword that causes lightning to strike every time you hit a mob, or a pickaxe that detonates TNT a few blocks in front of you every time it breaks a block.
its also really easy to set up without using data packs, which are still a hassle for people unfamiliar with programming or who just want to do something simple.
I really appreciate that you actually read comments.
Ɛ>
here's the thing:
I came across this looking for a way to detect when a player uses a heart consumable or revive consumable so disappearing automagically after using it is perfect. Especially paired with a little /kill @e magic specifically for the ender_eye while it's within a block of the player.
This man is a legend. Half of my command knowledge has come from his videos.
Video Idea: How about tutorials for the Advancements generator or the Item modifier generator?
Edit: also where did you learn your commands?
I learned a lot from Dragnoz' tutorials back when scoreboards were added to the game ;^)
Then I pretty much just kept up to date with each new update, and pretty soon commands had gotten huge. Also, learning programming in general helps a lot. There's a lot of things you can cross-apply.
Thanks for the suggestion ;^)
@@Legitimooseman i know c# (similar to java)
But Minecraft datapacks are its own unique confusing thing
I dont understand datapacks and seleciting and @
One thing im thinking of is making a programming language that compiles to Minecraft datapacks
But idk how doable it is
you also forgot detecting rightclicks on a specific block using items, the advancement is “item used on block” or something like that, i used it for a kit selection a while back and it works pretty well, sadly you can’t check when a player clicks on air, it has to be on a block, but it works without holding an item so that’s pretty cool
There are some fixes for the ender eye method to make it work with strongholds:
1) Replace item in player's hand with (customized) ender eye right after right click detected
2) Kill all ender eye entities in a certain radius after click detected
3) (optional) Check for a block which the player is looking at the moment of click (trace or any other method)
and replace it with an empty portal frame if the filled end portal frame is detected earlier
Just give the eye of ender a custom tag, and constantly /kill all thrown eyes of ender with that tag. You can also set it up so that if a player throws an eye with that tag, they are immediately given a new one. Might be some jitters in the instant after throwing it, but honestly, aside from that, it is the perfect method.
@@orionengland items don't have tags, do they?
Thank you, it's very rare to see different method compilation videos. I know a lot of these but have to think of them from scratch and a discussion of them all and pros/cons is an excellent review and super helpful.
Finally this is what I need idk if this is going to be a simple useless tutorial or something for more advanced users like me
My day went from trying to place a command block to destroying my computer because I clicked to fast on this video...
i love your shameless plug for the datapack tutorial. honestly ive watched it like 10x or more
Maybe you could make like a random number generation tutorial. Since its pretty useful :^)
Amazing video btw. Never knew you could use fungi for the right click detection, I will be sure to use that!
i don't think minecraft actually has any rng
after half way in the carrot on a stick method i relised that i already knew how to do right click detection, just watching because your funny
About the last part, it could actually work in plain survival if you set to the eye of ender a scoreboard "timer" to detect an eye of ender's time, so at some point you'll regain the eye of ender. Though that'll need 3 more commands.
But, it won't give you an other item if there aren't any other strongholds around, so that way you can make it work easily.
And else what can be done is a toggle function to the previous 3 commands, so they only will work when needed.
In case you need some more detail, I can then somehow help out with it.
I spent a while time trying to figure out right click detection in december of 2020 (figured it out tho) and now he posts a video about it.
well, at least it will be helpful to other people.
Also you have some of the best command block tutorials I've seen on youtube!! Great job!!!
finally a good tutorial, from someone i know(suscribed to and watch his other videos)
is this the greatest comeback in history?
There is a video by someone named conure where he runs a command that basically makes it so you can eat the item but if you set the eat time to a really high amount it doesn't play the animation
IM ABOUT TO MAKE MY DREAM OF DEVELOPING STUFF COME TRUE BECAUSE THAT JAVA STUFF LOOKS SO GOSHDAMN COOL AND NICE AND COMFY AND NOSTALGIATING
Then you'll be happy to know that 1.20.6 contains even more ways to create whatever you want! I recommend searching for ways to use the new datapack and command stuff, they're too many to explain in a reply.
@@mkks4559 ok thank you!! I appreciate any help!
7:28 The poppy flower 👁👁
Is there a way to counter the "slowness effect" that you recive while holding the Ender Eye trought datapack? I've tries with command blocks but they are top slow to detect when i stop using It so i get super-fast for half of a second before returning to my normal speed
You could also use snowballs for right-click detection. Just tag the snowball and when you chuck it, kill the snowball entity and give the snowball back, whether by /give or /item. You could do this with eggs and ender pearls as well!
Thanks so much for this. I was looking for an item without a cooldown for right click detection and this is perfect :D
5:52 Finally someone realised my strange left click to use control binding 💀
Thank you dude, when I search for command related stuff your videos are always the most helpful
I was here when you only had 4k subscribers. Now you have 28k... Your content is amazing!
Mojang added interaction entities and all you need to do is on target to detect it. This is so revolutionary.
you may need to update this now :))
/summon minecraft:interaction
Finally a new video!! Its been forever(2 months).
Just in time, i was looking this video on your channel xDD thank youuuu
i still have no clue what id do with this information but i enjoyed it ty
ty for helping with this detection. i was having a bit of trouble with it
Ives watched the first few seconds and I already know all that I need to rank you for getting straight to the point Ill watch the whole video tho ;)
I didnt know i needed you until i needed you (which is now)
4:21 nah what the hell. I never knew this, that makes my life so much easier
im so glad mojang finally added interaction boxes so we dont have to do this every single time we want to detect click
Great tutorial! There’s the fishing rod also 🎣
^ Good point, nearly forgot the ol' rod :o
@@Legitimoose There is also recipe book
The ender eye is exactly what I needed!
glad i could help!
Congrats on 5 Million Channel Views!!! :D
I love the fact that you recognized that some ppl don't use right click, I use left click lol (my brain got washed from left is place from bedrock before i got a pc)
mmmm i like it when they press that right click button inside minecraft
it gives me much joy
lets get this man to 30k
When the pigs follow you because you have a sniper rifle
this feels like bingewatching but im actually learning shit
For any Bedrock edition players out there I found a way to do it as well. So have a repeating command block that teleports an invisible armor stand to the player. Then have a command block testing if the player has the item to be clicked in their inventory. when they right click, the item will go to the armor stand and the command block will detect that the item is missing, thus triggering the desired command.
Another alternative is to get rid of the armor stand bit and make the player have to drop the item to trigger it. This the interaction is a bit easier for phone players.
Hopefully this is helpful and pls like so other PE players can see this.
There is a way to use the ender eye in survival and eggs, snowball, and ender pearls. The only problem is that you have to have 2 of the same item. You have 2 snowballs, you throw one, and now you have 1 snowball. You give yourself 1 snowball, you have 2 again, then you kill the snowball. So you detected that you threw the snowball (right clicked) and you can do it again
There is another limitation to the ender eye method people should be aware of, when you use it you can no longer sprint, unlike with the carrot on a stick
"You will see some errors
They are not real"
Best quote ever
ah man. ender eye won't work in survival??? :( but hey, i can use the villager talk advancement and now i know how to reset it! that actually cleared up so many things for me! thank you for making this video!
You could just additionally run a command to kill the summoned eye of ender when clicking. A right click detecting item, that consumes itself, can even be pretty usefull in some cases.
and using resource packs, you can use custom model data to make it look like other items, and you can just rename the items so it’ll look like whatever you want it to
Hi legitimoose! Love your content! Im here from the beginning ! , I would like if you make a video about Item Modifiers and Data command - Not enough information in this section of minecraft commands, And you are the only one who can do it the best!
To use the eye on multi just kill the eye of Ender entity every tick although it will disable normally using it but that's fine
if you execute as @a[scores={eye=1..},predicate=namespace:holding_eye_with_nbt] at @s run kill @e[type=ender_eye,sort=nearest,limit=1,distance=..2] then you can still use normal ones :)
Make a video about custom interfaces using chested llamas. I made such an interface as a crafting table with custom recipes and nbt.
i didnt watch this video yet, but i just wanna say your videos are amazing and i like them a lot
The legends spoke of his return
Was looking for this for months lol
You can actually make right click detection on eyes of ender work if you kill the nearest eye of ender when you have the score then kill the eye of ender item I have not tested this in game but it probably works.
Moose, I need to know, how do you shoot arrows in a direction you look, like a short bow, you right-click the command detects it, and then an arrow maybe three shoot off in the direction you're looking. Please I beg of you I need to know
I agree!
this is actually very difficult, you have to calculate the motion of the arrow using the players rotation as a vector. This method also requires lot of data/scoreboard knowledge, how to save/apply scoreboard data etc
/execute
theres examples on entity motion on r/minecraftcommands under wiki section, just edit the example to yo needs
@@yeti5609 does r/minecraftcommands helps with other commands?
Video idea: Using scores from scoreboards in commands
I needed it, he uploaded.
is there a way to make multiple click detections with only a carrot on a stick (maybe using nbt tags)
You forgot some methods: crossbow, any throwable, armor and the simplest: spawneggs
How do I use the on-a-stick method with specific nbt tags? i want to have multiple carrots on a stick in my pack that do different things but im not sure how to bind them to specific functioins
You're just the best Legitimoose
i have a question , its posible to do custom drop (maybe if i kill zombie TOM its give me gold ) only in commend blocks?
I had no idea there was syntax highlighting for datapacks in VSCode. That would've been nice to know!
Please make a 1.20 version with the "interaction" entity !
how to know what player put the item in an armor stand
you could use an advancement to detect when someone right clicks an armor stand using the minecraft:player_interacted_with_entity criteria, make the reward a raycast function to detect which armor stand you clicked
(or make it a function that runs a raycast after running something to the player)
{
"criteria": {
"requirement": {
"trigger": "minecraft:player_interacted_with_entity",
"conditions": {
"entity": [
{
"condition": "minecraft:entity_properties",
"predicate": {
"type": "minecraft:armor_stand"
}
}
]
}
}
},
"rewards": {
"function": "subscribe.to:legitimoose"
}
}
and then in the raycast function you could check for the item, and now you know who clicked boom life hack
i remember using a system like this for a custom item pickup system
or just do simple entity linking, Cloud Wolf had a good video on it on his channel, also way more lightweight
thanks for blessing me with your knowledge, mighty yeti
8:49 For a moment I thought it was a set up to a joke where the best right click detection was a button.
New way to do it without datapack -
*execute as @p if score @p carrot matches 1 run say hi*
Now add a chain command block with
*scoreboard players reset @p carrot*
How I make a unconditional conditional with a command?
The legend is back!
Mojang should add build in right click detection if you ask me
Another method I use is item frames. You detect when a player is near one and rotates it. Like this
execute at @a if entity @e[type=item_frame,nbt={Item:("minecraft:paper", Count:1b)}, distance=..3] store success @p scoreboard_objective_here run data merge entity @e[type=item_frame,nbt{Item:("minecraft:paper", Count:1b)}, distance=..3,nbt={ItemRotation:1b},limit=1] {ItemRotation:0b}
Pared with this command.
execute at @e[type=item_frame,nbt={Item:("minecraft:paper", Count:1b)}] if entity @a[distance=3..] run data merge entity @e[type=item_frame, limit=1, distance=0,nbt={ItemRotation:1b}] {ItemRotation:0b}
Put both inside your tick function.
On every item frame you want to have be clickable use this command on them.
data merge entity @e[type=item_frame,limit=1, distance=..1] {Invulnerable:1b}
Note: this was written on a phone, double check for errors. Also I use a lot of redundant entity calls as opposed to @s, I do this because sometimes @s brakes.
I can now make datapacks!
I made a custom recipe for powder snow and teams you can join from a book like NoDeathMessages Team for mini games where death messages are important all inspired by legitimoose thanks :D
And you should make shorts too like explaining /trigger and how useful it is
Im making a map with shops, and to purchase from the shops you need to click a button for a series of commandblocks to run.
I was wondering if there is a way to detect who pressed a button, because Id hate to use the @p that is closest to the button.
I tried to look into scoreboard objectives, and into UUID, but couldnt find anything that would help me.
You, Legitimoose, seem like the guy who would know how to make such a thing work, and Id really appreciate it if you could help me out.
Advancements
@@_Cubicake Cupcakes.
Its really nice leaving a single word without explanation, isnt it?
I think he means you could give a advancement to the playera that presses the button and then revoke it and give the ítem with chain command blocks
@eacerca12
But how would I detect who pressed the button? That's the problem I'm having.
Normally people would do @p (the closest player) to the button, but what if there is already a player between you and the button? It would run the command on the other player since he is closer to the button, no matter if its an advancement command or a scoreboard.
Easier to set up! (proceeds to code an entire datapack)
Jk nice tutorial, the villager method is genius thanks
video idea: show how to make custom damage in minecraft?
I've been trying to find a way to do this stuff with only command blocks for ages now... now I realize I'm trying to do the impossible. Guess its finally time to bite the bullet and learn how to make datapacks.
Pfff whoa you're really smart 🤣 man I wish I knew everything you know, trying to make data pack rn and am struggling
I have a video idea, or rly just a question cause idk if you could make a whole vid on it, but how do you make a random chance generator that has a chain of commands for each number? Like, let’s say a 1-20 chance, where 1 would deal one damage to the player, two would deal two, etc. The only way I know right now of making that sort of thing is armor stand randomizers (execute at @e[tag=randomchance,limit=1,sort=random) run setblock ~ ~-1 ~ redstone_block, with command blocks under the redstone block) but that’s physical and I can’t figure out how to change it into a data pack. Maybe would I use a random chance predicate or something?
Personally for RNG... I always just use other people's RNG datapacks ;^)
Cloud wolf has got a really nice datapack that can generate a random number in the range of your choosing using a nice pseudorandom algorithm thingy. Honestly can't recommend it (and his video about it) enough! Very useful stuff and I'd just butcher it if I explained it in this comment lol
@@Legitimoose amazing, thanks! I was thinking about how to make a pseudorandom thing cause I just saw your video on how to do things like multiplication and division with scoreboards, then you responded lol.
I cant wait for lightning to strike on the invisible villager, turning into a witch
sjkdjskdskjds yknow,,,, i hadnt thought of that. do NoAI mobs still convert though? 🤔
@@Legitimoose I just tested it and yeah the villager still turned into a witch lol
if we add Invulnerable to it?
its 1.19 but won't be 1.20 because of the interaction entities
super informative, concise and useful. noice
I am on 1.18 and the eye method doesn't seem to work, it is constantly increasing the score even after I stop holding down right click
You did what I always wanted!!!
Hey legitmoose, do you know why when i moved my datapacks from 1.16.5 to 1.17.. all my tick.json functions were not triggering? They worked perfectly in 1.16 and ive heard other people with the same issue