So, mind helping me please? I need something like that but inversed. If zombie looks at player command happens, i tried inversing it but it didn''t work.
First off, thank you! These tutorials help tremendously for anyone trying to teach themselves how to make datapacks like myself. Secondly, I used this to make a sort of teleportation staff, to instantly tp the player to the block they're looking at, so if anyone is wondering what else this can be used for there are a lot of options
Seriously these type of RUclipsrs should at least be noticed for actually making us learn something and their effort on it. Thanks man I've watched a lot of your command block tutorials and other videos it really helps me 👌.
I was aware of raycasting but not the first method, which gave me an idea for something I was thinking for a few hours... After doing simple logic I came to the realization the distance written there (0.3 in the video) is actually detecting whether the target is in a range within(approximately) 180x degrees(where x is the distance) from your forward vector. Also supporting by Cloud Wolf saying that putting a value of 1 detects if it's in anywhere you're looking(not quite true due to changing FOV but is true to normal fov. Also not accurate on the Y axis). Using this method I managed to test if a target is visible to a specific player, by first running this command with a distance value of 1, and if true, running a raycast facing that target that stops upon a non-passable block to see if it the sight is clear. Just thought I'd point it out if anyone ever wants to use this idea
Great video, as a datapack developer I can see a lot of potential with raycasting, especially when wrapped within proper function protection. I've had this video saved to watch for a while, thanks for the info!
I watched this video a year ago, having no clue what any of this meant. Today after learning command blocks better, finally get how it works, and it is genius.
This only works on the nearest entity, and only on one entity at a time. You can make it work for multiple players and multiple entities with this command: execute as @e at @a anchored eyes facing entity @s eyes anchored feet positioned ^ ^ ^1 rotated as @p positioned ^ ^ ^-1 if entity @p[distance=..0.3] run effect give @s glowing 10 10 true This basically turns the calculation around, so it's not the player checking what singular entity they're looking at, but each entity is checking whether or not they're in a player's central vision. I wish there was a good way to do something about the angle being too narrow when near a player and too wide when far from a player, but I guess you'd just have to run it a couple of times with different distance ranges on the first @s, and vary how wide the angle is allowed to be. That could get pretty laggy pretty fast (this is already a little laggy I imagine, but it could be made better by just putting a distance limit on that first @s so it stops checking entities that are too far away)
At the cost of accuracy you can alternate between two look functions with a larger range for the selector arguments using distance parameters in only one of them, while the other only checks for air. It decreases the number of selector arguments used. Also, if you’re using effects, no one will notice if the effect goes on for a few extra game ticks to keep the look function calls spaced out longer and the calls lighter.
make a block face the player? i mean there r 4 directions u can just face the player use a 4d snap then give approximate /setblocks based on the rotation of it
You can make an armor stand wear a block. /summon armor_stand ~ ~ ~ {Invisible:1,ArmorItems:[{},{},{},{id:"minecraft:observer",Count:1}],HandItems:[{},{}]} Then add a repeating command block to make the armor stand look at you. /execute as @e[type=minecraft:armor_stand] at @s facing entity @p eyes run tp @s ~ ~ ~ ~ ~
@@hydra9070 i mean it just depends on ur system but u can always check if player's rotation is between certain ranges and then do a setblock based on that (it would b 4 checks/setblocks)
Hi I loved your video but that don't solve my problem. I just want run a command when a player of a team look at a player of an another team. i've try to change you command but i've failed. (/execute if entity @a[team=a] anchored eyes facing entity @a[team=b] eyes run say YES) sry for the fault i'm not english but i'm looking for a solution everywere.
not sure if this will be read but to fix the hitbox issue just run another adjacent command that detects for feet instead of eyes. kinda sucks you cant use both commands at once but it is what it is
Thank you for the amazing tutorial! I have a question: If i use this command some blocks away from the command block it won't work, can you tell me why and how can I solve it? I tried to modify the distance but in that case the command activated also if I wasn't looking directly into the mob.
I know for the single command version, expanding the hitbox of the entity/block you wish to look at was addressed, for doing ray casting with the datapack version you made, which was much more accurate, how can you do a similar thing with that?
I’m getting back into map making after a long break and old world editors like MCEdit seem to not be working for the latest versions. Are there any editors that did even half of what MCEdit did? Also in your tutorials for data packs, I’m interested in how you would automate some of these processes, for example how would one convert an actual build in a Minecraft world into a structure for a data pack?
Teorik Redstone'cu like a structure file can be made with structure blocks as for Mc edit idk if any new things exist that y I made a nifty item structure saver datapack that lets u move super large structures between worlds
I dont understand anything in the command block section... so the command executes as the player at the eyes. but then facing entity... does that mean it executes at the entity's eyes? and then the anchored feet... what? so it anchores at my feet and moves 1 block infront of it... move what exactly? then it rotates to where my rotation is and then positioned ^ ^ ^-1?????? I dont get it...
It moves towards the entity then facing like the player it goes backwards. If doing those two things ends up close to the player then it is in the FOv specified. Ex: entity behind player. U move 1 block towards that entity. Then facing the way the player is u go backwards 1, this nets u 2 blocks behind the player (if the player faces opposite) which would not put u within the 0.6 blocks ex: entity direction looking at. Move towards it 1 block. Facing same direction, move backwards 1 block. U will be where u started which is at the player so ur in the distance selector
can anyone explain why this doesn't work with a custom entity? (raycast method) summon zombie ~ ~ ~ {Silent:1b,DeathLootTable:"scp:empty",PersistenceRequired:1b,CanPickUpLoot:0b,Health:100f,IsBaby:0b,CanBreakDoors:0b,Tags:["scp_173"],CustomName:'{"text":"SCP-173","color":"yellow","italic":false}',ArmorItems:[{},{},{},{id:"minecraft:emerald",Count:1b,tag:{CustomModelData:173,peanut:1b}}],ArmorDropChances:[0.085F,0.085F,0.085F,-327.670F],Attributes:[{Name:"generic.max_health",Base:100},{Name:"generic.follow_range",Base:32},{Name:"generic.knockback_resistance",Base:0.8},{Name:"generic.movement_speed",Base:0.8},{Name:"generic.attack_damage",Base:100},{Name:"generic.attack_knockback",Base:0.1},{Name:"zombie.spawn_reinforcements",Base:0}]} all other mobs glow when looked at, except this one edit: nbt on a mob breaks it, is there a workaround?
Okay I tried to use the datapack version to be accurate. But I don't want entities to glow, I want to teleport the player that looks at that entity to somewhere. So how do I change the selector in `execute as *@e*[dx=0] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run effect give @s glowing 1 1 true` this command from @e to the player that executes it? Probably Cloud Wolf won't see this
If you added a youtube "super thanks" to your page, I would given you some moolah for this awesome tutorial. I don't do patreon stuff, but I do use google play credit cash.
Gonna tell you, i did not know how i could replace items in the containers for my data pack, so the item I want OUT of the game and replaced by another without millions of lines of commands, but ray helped me a ton, I just check for all the containers player looks at and if the container has that item I want to replace is being replaced immediately, before player can even see the change in the block Tho, it still sucks I need to check for one slot at the time, so just a chest need 27 lines for each slot
@@ToughDialga007 the item u can find with an array search and edit it’s .tag, .Count, and .id it would be more efficient that way too but u can only do 1 at a time
Hey I was confused when you could change the @e to any entity you want and does this work with custom mobs and if you can cand you send me the first command line in the description but just specifically for a sheep so I could edit it? also amazing videos you have helped me alot!
@@spacecat_2476 what do u mean too late? I have another video that runs on the thing you look at. If u use the predicate method it’s complicated to do efficiently but u could do execute at @s if entity @a[predicate=(looking at predicate)] run say I’m being looked at!
THIS IS AMAZING; I was hoping to ask you if this works on bedrock edition? and if not, would this work on a player and how would I make it so that when the player is looked at the player is frozen in position? pleas help me thank you!
I know you said not to comment about this, but unfortunately I still don't get the closing thought. For a multiplayer setting, if /execute as @a at @s anchored eyes run function test:start is run every tick, won't every player have the 'this' tag? If so, how will each ray be able to distinguish which is their sender? Is this the wrong way to do it? Thanks!
Pi E as long Asu don’t do @a inside another sub function the game will need to play all subfunctions including the ray for each player 1 at a time in order so by the time player B starts raycasting player A already got the tag raycastedand removed the tag
hey is it possible to use the function technique but use say 7 chain command blocks instead of the function if you only want the range to be 7 blocks or less? great vid!
Purple Pumpkin no u can’t use raycasting in command blocks maybe u could try to hardcode it all but that would be a lot and a mess and u would b able to reach through walls
U can first detect the entity then start at the player and face the entity (execute facing) and check positioned ^ ^ ^1 if block air repeatedly until u arrive at the entity and if there was all air then it’s tru but this method requires either slow tp approach to go dynamically along the line or 1 command for each possible distance the entity was. Ie my detect command was a range of 3 blocks if that’s true I know it’s around 3 blocks away so use my special command that does positioned ^ ^ ^1 3 times before it looks for the entity
Hello CloudWolf, Here is a request: There are 10 cows which have the scores 1 to 10, and there are 10 parrots which also have the scores 1 to 10, how do i teleport all the parrots to the cows with the same scores? (1->1, 2->2,...,10->10)
dan boyicac that’s my entity linker command/datapack/vid u just doe execute as @e at @s as @e if score @s id = @e[sort=nearest,limit=1] id run tp @s ~ ~ ~ also addd specification you @e for better effficiency
i doubt you will see this, but how do you make it so the raycasting ignores blocks that you can still right click something through ex. mushrooms, vines, slabs, etc.?
I tried this raycasting method for the first time, I had my own tick-based ones but not an instant one. I ran the exact same "hitbox" detection command... And it worked.. with an offset of a block. By the way the glow I can tell it goes over the hitbox accurately, but it detects it only when I look one block to the negative Z from them. I have no idea why... Even when I made it practically identical to yours it seems that it only detects a mob when I look one block to the negative Z from it
Hi! great video, but i need some help, is there any way to make the look line wider? Like make it so that it works if its even in view? I'm trying to make a mob that only moves when out of sight. Thanks in advance. EDIT: By the way, for the command block method, not the raycast.
damn I got the block version working, so satisfying too bad the conical nature of detection makes the long range accuracy drop edit: and the sensitivity value can't be smaller than 0.1 apparently
SIDENOTE: Original version of facing one command provided by AjaxGB from the MCC
So, mind helping me please? I need something like that but inversed. If zombie looks at player command happens, i tried inversing it but it didn''t work.
omg nvm, made it to work, im so happy
@@wiktorttt1u can just mess with who has the face_me tag
@@wiktorttt1 Hi! You can tell me as you have done since I want to do something similar but it doesn't work for me either ...
@@wiktorttt1 ok dont worry :D
First off, thank you! These tutorials help tremendously for anyone trying to teach themselves how to make datapacks like myself. Secondly, I used this to make a sort of teleportation staff, to instantly tp the player to the block they're looking at, so if anyone is wondering what else this can be used for there are a lot of options
Seriously these type of RUclipsrs should at least be noticed for actually making us learn something and their effort on it. Thanks man I've watched a lot of your command block tutorials and other videos it really helps me 👌.
I was aware of raycasting but not the first method, which gave me an idea for something I was thinking for a few hours...
After doing simple logic I came to the realization the distance written there (0.3 in the video) is actually detecting whether the target is in a range within(approximately) 180x degrees(where x is the distance) from your forward vector.
Also supporting by Cloud Wolf saying that putting a value of 1 detects if it's in anywhere you're looking(not quite true due to changing FOV but is true to normal fov. Also not accurate on the Y axis).
Using this method I managed to test if a target is visible to a specific player, by first running this command with a distance value of 1, and if true, running a raycast facing that target that stops upon a non-passable block to see if it the sight is clear.
Just thought I'd point it out if anyone ever wants to use this idea
Dude... you... are... a freaking... genius!!! HOW DO YOU DO IT?!?
being well-versed in algorithms (spec. recursive functions) and ingame knowledge
Do you know this is a damn tutorial for this?
Brain damaged
If you eat your vegetables you can do it
You are a genius, you deserve more watchers, sadly there isn’t a big amount of people who is interested in commands. Greetings from Chile
Only because they think it's hard but its not
@@pbandi100 it is indeed hard, like there are commands that requires so much brackets and its confusing af
@@SirKratos_ Nah
Hey Cloud, been a while. Glad to see you're still making sweet content! :)
thanks for actually explaining instead of just dumping the command, it helps me to actually learn it. great video!
Great video, as a datapack developer I can see a lot of potential with raycasting, especially when wrapped within proper function protection. I've had this video saved to watch for a while, thanks for the info!
I watched this video a year ago, having no clue what any of this meant. Today after learning command blocks better, finally get how it works, and it is genius.
I dont understand how it works.
Can you help me?
This is beyond science
I really love your videos and the effort you put into these.
Well done. :)
this is beyond -science- basic commands.
I was trying to do something like the doctor who's weeping angel, now I know how to do this, thank you!
This only works on the nearest entity, and only on one entity at a time. You can make it work for multiple players and multiple entities with this command:
execute as @e at @a anchored eyes facing entity @s eyes anchored feet positioned ^ ^ ^1 rotated as @p positioned ^ ^ ^-1 if entity @p[distance=..0.3] run effect give @s glowing 10 10 true
This basically turns the calculation around, so it's not the player checking what singular entity they're looking at, but each entity is checking whether or not they're in a player's central vision. I wish there was a good way to do something about the angle being too narrow when near a player and too wide when far from a player, but I guess you'd just have to run it a couple of times with different distance ranges on the first @s, and vary how wide the angle is allowed to be. That could get pretty laggy pretty fast (this is already a little laggy I imagine, but it could be made better by just putting a distance limit on that first @s so it stops checking entities that are too far away)
ONE MONTH, I'VE BEEN LOOKING FOR ONE MONTH ON HOW TO DETECT THIS, OMG THANKSSSSSSSSSSS
At the cost of accuracy you can alternate between two look functions with a larger range for the selector arguments using distance parameters in only one of them, while the other only checks for air. It decreases the number of selector arguments used.
Also, if you’re using effects, no one will notice if the effect goes on for a few extra game ticks to keep the look function calls spaced out longer and the calls lighter.
Zambozoo ya I typically run look functions 1/10ticks
@@Cl0udWolf how do you make a function run every x ticks? Scratch that, learned about schedule command
i know the raycasting is more practical but the first one is just so clever!
Didn't even know a lot of those were command functions available, you've given me a lot of fun experimenting tools
the command just completely flops when there are more than one player in the area
Cloud Wolf is it possible to make a block (using spawn eggs)face the player?
Great video by the way.
make a block face the player? i mean there r 4 directions u can just face the player use a 4d snap then give approximate /setblocks based on the rotation of it
You can make an armor stand wear a block.
/summon armor_stand ~ ~ ~ {Invisible:1,ArmorItems:[{},{},{},{id:"minecraft:observer",Count:1}],HandItems:[{},{}]}
Then add a repeating command block to make the armor stand look at you.
/execute as @e[type=minecraft:armor_stand] at @s facing entity @p eyes run tp @s ~ ~ ~ ~ ~
@@mrjeremyface6614 The problem is there needs to be a button on the furnace but thanks for the suggestion.
@@hydra9070 i mean it just depends on ur system but u can always check if player's rotation is between certain ranges and then do a setblock based on that (it would b 4 checks/setblocks)
@@Cl0udWolf Thanks!
OMG I didn't know dx=0 does that. It's briliant!
dx/dy/dz operate on the entity hitbox, distance operates on the entity origin
say AW MAN
tp @s ~ ~100 ~
kill @s
*are we just gonna ignore this*
I wish bedrock was like this.....
Dude you are seriously amazing. So helpful. I had no idea you could do some of this stuff with commands
does this work with non player entities looking at players
Best Minecraft map: “Don’t Stare”
wow, strong ! I definitely have to use it !
helpful for scp maps and scp 173 itself
Is test:look still supposed to target an entity when used to detect a block like at 11:19? I can't figure out what the test:look is supposed to be.
scp-173 in minecraft: make a zombie with speed 10, strength 100, and resistance 100 that turns into an armor stand when you look at it
Or give it a slowness effect large enough to prevent it from moving
Hi I loved your video but that don't solve my problem. I just want run a command when a player of a team look at a player of an another team. i've try to change you command but i've failed. (/execute if entity @a[team=a] anchored eyes facing entity @a[team=b] eyes run say YES) sry for the fault i'm not english but i'm looking for a solution everywere.
not sure if this will be read but to fix the hitbox issue just run another adjacent command that detects for feet instead of eyes. kinda sucks you cant use both commands at once but it is what it is
U can more easily use a dx hitbox method if needed
Hi can u make a video of how to detect if an entity is near you i have a lot of trouble with that :D
Thank you for the amazing tutorial! I have a question: If i use this command some blocks away from the command block it won't work, can you tell me why and how can I solve it? I tried to modify the distance but in that case the command activated also if I wasn't looking directly into the mob.
make sure u do as (starting entity) at @s
I know for the single command version, expanding the hitbox of the entity/block you wish to look at was addressed, for doing ray casting with the datapack version you made, which was much more accurate, how can you do a similar thing with that?
U can use a combination of both. Use the single command then use raycasting to see if there is a line of sight
Could I do it on minecraft bedrock?
I’m getting back into map making after a long break and old world editors like MCEdit seem to not be working for the latest versions. Are there any editors that did even half of what MCEdit did? Also in your tutorials for data packs, I’m interested in how you would automate some of these processes, for example how would one convert an actual build in a Minecraft world into a structure for a data pack?
Teorik Redstone'cu like a structure file can be made with structure blocks as for Mc edit idk if any new things exist that y I made a nifty item structure saver datapack that lets u move super large structures between worlds
Thanks for all the information! Great video
Thank you this was so helpful
Instead of using the range scoreboard you can just use @s[distance=..20]
Yoav Sigler sure if u don’t mind that it’s way slower/laggier
I REALLY needed this! TYSMMMMMM
Bedrock version of the first command?
Could i make it so that when an other looks at me it detects it? Just wondering if it’s possible
what app you use for the cod?
can you figure out how to do it in make code for education edition
I dont understand anything in the command block section... so the command executes as the player at the eyes. but then facing entity... does that mean it executes at the entity's eyes? and then the anchored feet... what? so it anchores at my feet and moves 1 block infront of it... move what exactly? then it rotates to where my rotation is and then positioned ^ ^ ^-1?????? I dont get it...
It moves towards the entity then facing like the player it goes backwards. If doing those two things ends up close to the player then it is in the FOv specified.
Ex: entity behind player. U move 1 block towards that entity. Then facing the way the player is u go backwards 1, this nets u 2 blocks behind the player (if the player faces opposite) which would not put u within the 0.6 blocks
ex: entity direction looking at. Move towards it 1 block. Facing same direction, move backwards 1 block. U will be where u started which is at the player so ur in the distance selector
thx i was trying to make a rapid punch but i cloud not find a why to detect when you look at a mob
can anyone explain why this doesn't work with a custom entity? (raycast method)
summon zombie ~ ~ ~ {Silent:1b,DeathLootTable:"scp:empty",PersistenceRequired:1b,CanPickUpLoot:0b,Health:100f,IsBaby:0b,CanBreakDoors:0b,Tags:["scp_173"],CustomName:'{"text":"SCP-173","color":"yellow","italic":false}',ArmorItems:[{},{},{},{id:"minecraft:emerald",Count:1b,tag:{CustomModelData:173,peanut:1b}}],ArmorDropChances:[0.085F,0.085F,0.085F,-327.670F],Attributes:[{Name:"generic.max_health",Base:100},{Name:"generic.follow_range",Base:32},{Name:"generic.knockback_resistance",Base:0.8},{Name:"generic.movement_speed",Base:0.8},{Name:"generic.attack_damage",Base:100},{Name:"generic.attack_knockback",Base:0.1},{Name:"zombie.spawn_reinforcements",Base:0}]}
all other mobs glow when looked at, except this one
edit: nbt on a mob breaks it, is there a workaround?
This is the thing that I was looking for YES
How do you make a datapack wait, for example, in python, its just sleep(seconds). What would I do for a datapack?
/schedule *datapack:your_function* 2s,
or 40t, for example
Okay I tried to use the datapack version to be accurate. But I don't want entities to glow, I want to teleport the player that looks at that entity to somewhere. So how do I change the selector in `execute as *@e*[dx=0] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run effect give @s glowing 1 1 true` this command from @e to the player that executes it?
Probably Cloud Wolf won't see this
Oh ok I fixed it myself I removed the "at @e" thing and it works. Thanks for your help :D
If you added a youtube "super thanks" to your page, I would given you some moolah for this awesome tutorial. I don't do patreon stuff, but I do use google play credit cash.
I don’t do either, sometimes I live-stream and have donations on other than that I don’t setup much
Hey, im trying to create chess now, and i have a question - can i do raycast without functions?
Minecraft Online see my newest vid on hitboxes u can but it isn’t accurate
how can i check if there's a block in the way, so if i'm not seeing it, it doesn't activate the command?
gecko I covered that in the video with the raycasting method make it only loop if the block ur in is air
@@Cl0udWolf ok thanks
Gonna tell you, i did not know how i could replace items in the containers for my data pack, so the item I want OUT of the game and replaced by another without millions of lines of commands, but ray helped me a ton, I just check for all the containers player looks at and if the container has that item I want to replace is being replaced immediately, before player can even see the change in the block
Tho, it still sucks I need to check for one slot at the time, so just a chest need 27 lines for each slot
Depends, u can do data remove block x y z Items[{data of the item ur looking for}]
I actually did if block I look at has specific item in specific slot, that slot gets replaced with the custom item
@@ToughDialga007 ah well replace would require hardcoding kind of? It wouldn’t if u did it right but hardcoding would be most efficient potentially
@@Cl0udWolf not really familiar with the concept 😅
@@ToughDialga007 the item u can find with an array search and edit it’s .tag, .Count, and .id it would be more efficient that way too but u can only do 1 at a time
Is it possible to make me(the looking player) glow when looking at the entity?
Hey I was confused when you could change the @e to any entity you want and does this work with custom mobs and if you can cand you send me the first command line in the description but just specifically for a sheep so I could edit it? also amazing videos you have helped me alot!
Can’t get this to work. Says there’s a error with the @p being placed where it is. Any help?
I understand that it's too late to write, but I want to find out...how do I make the command activate when another player looks at me/into my eyes?
@@spacecat_2476 what do u mean too late? I have another video that runs on the thing you look at. If u use the predicate method it’s complicated to do efficiently but u could do execute at @s if entity @a[predicate=(looking at predicate)] run say I’m being looked at!
THIS IS AMAZING; I was hoping to ask you if this works on bedrock edition? and if not, would this work on a player and how would I make it so that when the player is looked at the player is frozen in position? pleas help me thank you!
is it possible to replace the first command to make it target if player is looking at a specific block?
a block isn't an entity, so sadly no...
I know you said not to comment about this, but unfortunately I still don't get the closing thought. For a multiplayer setting, if /execute as @a at @s anchored eyes run function test:start is run every tick, won't every player have the 'this' tag? If so, how will each ray be able to distinguish which is their sender? Is this the wrong way to do it? Thanks!
Pi E as long Asu don’t do @a inside another sub function the game will need to play all subfunctions including the ray for each player 1 at a time in order so by the time player B starts raycasting player A already got the tag raycastedand removed the tag
@@Cl0udWolf Ohhhhhhhh that makes sense. Thanks!
Is there a way for the command version to work on multiple enemies?
hey is it possible to use the function technique but use say 7 chain command blocks instead of the function if you only want the range to be 7 blocks or less? great vid!
Purple Pumpkin no u can’t use raycasting in command blocks maybe u could try to hardcode it all but that would be a lot and a mess and u would b able to reach through walls
@@Cl0udWolf thanks for the awnser! your super helpful!
So pretty much to sum it all up ^ ^ ^ isawesome
do it with playsound, when an entity is looking on you a sound starts playing
how do i use the simple one and not make it go through blocks?
U can first detect the entity then start at the player and face the entity (execute facing) and check positioned ^ ^ ^1 if block air repeatedly until u arrive at the entity and if there was all air then it’s tru but this method requires either slow tp approach to go dynamically along the line or 1 command for each possible distance the entity was. Ie my detect command was a range of 3 blocks if that’s true I know it’s around 3 blocks away so use my special command that does positioned ^ ^ ^1 3 times before it looks for the entity
@@Cl0udWolf thanks, also you did a really good job explaining the weirdness of the commands lol
Hello CloudWolf, Here is a request:
There are 10 cows which have the scores 1 to 10,
and there are 10 parrots which also have the scores 1 to 10,
how do i teleport all the parrots to the cows with the same scores? (1->1, 2->2,...,10->10)
dan boyicac that’s my entity linker command/datapack/vid u just doe execute as @e at @s as @e if score @s id = @e[sort=nearest,limit=1] id run tp @s ~ ~ ~ also addd specification you @e for better effficiency
Thank you very much :DD
I got it
hey im just asking how do i kill a mob im looking at in specific block range,
Sorry for being late, but i do believe you could make the effect caused to observed entities be instant damage in order to kill them.
How would one add a distance cap to the command code?
i doubt you will see this, but how do you make it so the raycasting ignores blocks that you can still right click something through ex. mushrooms, vines, slabs, etc.?
Cat_Stack Gaming make a block tag and do if block for that block tag
@@Cl0udWolf omg, thank you, i didnt even know custom block tags were a thing till you said this!
I tried this raycasting method for the first time, I had my own tick-based ones but not an instant one. I ran the exact same "hitbox" detection command...
And it worked.. with an offset of a block.
By the way the glow I can tell it goes over the hitbox accurately, but it detects it only when I look one block to the negative Z from them. I have no idea why... Even when I made it practically identical to yours it seems that it only detects a mob when I look one block to the negative Z from it
Practically. Meaning I know for a fact u got the detection line wrong XD
I missed a minus sign-
Whoops
Sorry to disturb, but I appreciate your fast reply and the fact you even replied, thank you
@@aperson3159 it’s ok ur not the first person to have that exact issue for missing a sign there
Hi! great video, but i need some help, is there any way to make the look line wider? Like make it so that it works if its even in view? I'm trying to make a mob that only moves when out of sight. Thanks in advance. EDIT: By the way, for the command block method, not the raycast.
choclo234 I already discussed that u change the distance=..0.3 selector to higher values
@@Cl0udWolf Sorry i missed it, but thanks!
damn I got the block version working, so satisfying
too bad the conical nature of detection makes the long range accuracy drop
edit: and the sensitivity value can't be smaller than 0.1 apparently
what datapack program do you use?
that's pretty smart
thank you
I need your help, if the player is facing a zombie in his eyes, the player die, how can i do that ?
Like this with ender man just make it kill and make the cone radius more exact or use raycasting and look for the head
@@Cl0udWolf that doesn't work, probably caus i am in 1.19.2
@@thesmiley5171 the commands still work in 1.20
@@Cl0udWolf so why did when i copy the command it do nothing
@@thesmiley5171 u did it wrong
is there a way to do that in 1.12?
I'm confusing about ^ ^ ^ (position).
What is its different between ^ ^ ^ and ~ ~ ~?
^ is local and ~ is global. as in ~ ~ ~ is X Y Z and ^ ^ ^ is left, up forward (in that it moves based on rotation)
Does someone knowe how to give items with custom names? In 1.14.4
/give @p {display:{Name:"[{\"text\":\"\",\"italic\":false}]",Lore:["[{\"text\":\"\",\"italic\":false}]"]}} 1
Or you can use mcstacker.net
what about a command for not looking at the entity?
just invert the predicate. execute unless
I'm still having trouble understandingthe solution to make it server friendly with the start function
that entirely has to do with how you implement selectors and function order. and not anything to do with this video
can i use this command in 1.17
how can I detect if an entity is near the center of the screen, and not directly in the center of the screen?
i show that w/ the 1 command method
Is there a way to get the coordinates of a block the player is looking at?
Raycast until the raycast is in a block then summon an entity or tp one at the end of the line and store it’s x y z Pos on scores
does this work on bedrock
What about looking at something though a wall?
The raycasting accounts for wall detection but if u want the approximate u can do approximate, then fire a raycast at the thing to check for walls
@@Cl0udWolf Alright, thanks!
how to make it so their is a limit to how far you are from the entity for it to detect
With raycasting just use a scoreboard with the other use a distance check
How can I do the opposite? I want to check an entity with a tag when i am NOT looking at it.
Mert AYDIN well just if the method does not succeed then u are not looking at it
How to command Minecraft windows 10 edytion ?
Holy cow ur so cool
How to do it in minecraft pe when u look at a zomnie and u die
does this work in mcpe?
no
:(
Does this work in 1.15.2? Can't seem to get it working, even copy pasting the one command code.
thats the version i did the video in
hm, i dont understand why its not working for me.
gonna make amaterasu
I was the 1000 like!
how to get the datapack
Nice video
how can i make this work on other players?
lol I never thought I would see a video on something this specific