A
Admincraft8mo ago

redstone @p vs @s

how do I ensure the person pulling the lever has the command blocks applied
No description
22 Replies
Admincraft Meta
Admincraft Meta8mo ago
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close !close !solved !answered
Requested by godlyreaper#0
Cooleg
Cooleg8mo ago
if you wanted to make for sure what ive seen most maps do is either make it so u have to walk onto an area
᲼
OP8mo ago
I thought target selector @s was for the person executing the lever
Cooleg
Cooleg8mo ago
or interact with some other interaction entity @s is whatever is actually running the command so if you run a command @s its you if you execute as a command as a creeper @s its the creeper the command block isnt an entity so it just does nothing
᲼
OP8mo ago
okay so how do I use an "interaction entity" so I can pass the player down to these command blocks
Cooleg
Cooleg8mo ago
theres entities that players can click and you can see who clicked it so you could put it over a block or sign or smthn and when a player clicks it you can run a command or whatever you could also give them a item they have to right click using like a carrot on a stick and then most people just retexture it later
᲼
OP8mo ago
so a lever on its own doesn't work how do I do it via sign/block?
Cooleg
Cooleg8mo ago
interaction entities
᲼
OP8mo ago
does a sign give a pulse?
Cooleg
Cooleg8mo ago
Minecraft Wiki
Interaction
Interaction entities are a technical entity, useful for map or data pack creators to see who the last player to click on a certain spot is. They can only be created with the /summon or /execute summon commands. Interaction entities are invisible, invincible and of a custom size. Their boundary box can be viewed via the F3 + B debug shortcut.
᲼
OP8mo ago
or are you referring to a plugin
Cooleg
Cooleg8mo ago
you could put a interaction entity around the signs hitbox
᲼
OP8mo ago
ah, could I do this with the lever too?
Cooleg
Cooleg8mo ago
yeah with the lever signs iirc have their own click event system so you may be able to do that without using an interaction entity
᲼
OP8mo ago
how do I add this interaction entity to my system, or do I have to make one for each command and then hook all of them up to the lever area
Cooleg
Cooleg8mo ago
this tells you more abt how to use it
᲼
OP8mo ago
so if I wanted to use this on my tp, how do I use the variable?
Cooleg
Cooleg8mo ago
you detect the player right clicking recently you tp
᲼
OP8mo ago
yes I understand with /data get entity but how does that hook up to tp what would the command look like?
Cooleg
Cooleg8mo ago
you loop that and if it finds that a player right clicked entity then execute a command /execute if will come in handy
᲼
OP8mo ago
ill look up a youtube video, sounds like I need to do some reworking if I use a sign, will right clicking the sign pulse a signal?
Cooleg
Cooleg8mo ago
no you have to set a click event command on it which will be ran

Did you find this page helpful?