#Detecting the location of a block through advancements
1 messages · Page 1 of 1 (latest)
💬 While you wait, take this time to provide more context and details.
🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
can't you just take the player who opened it and get the block he's looking at?
no i want to be able to modify the block when the player opens it
no, there is currently no way to do that directly and 100% accurately, you always either need to raycast to check where the player is looking at or check every single block in the area if you know what block was placed/opened
ah i see
i was wondering if i could change my already laggy raycast to advancements
guess i'll have to deal with it
and i don't suppose its possible to copy data from an entity to a player by using advancements?
wait can you use advancements to detect looking at an entity?
not really, no
there is a looking at predicate for players but that behaves unintuitively
and you still need to go through all entities in the area
so its not faster than a raycast most of the time
oh
do you have suggestions on you best the distance for a raycast to travel
i have it set to .06 blocks every tick rn
I always use a step distance of 0.1 and then go a little over 6 blocks in range
thanks :D
Your question, #1194638820361109584 (Detecting the location of a block through advancements), was resolved!
Is it possible to dynamically detect the location of a block when it has been used? for example, if i open a barrel, can i know its coordinates and run a command on that location?
11m
Re-opened the channel. Make sure to close it again once you're done.