1
Deleted
[deleted]
12
If you could elaborate on what is the purpose of the sensor, then I could probably help. Myself using a position based guid identification scanner in a project.
You can use the tag feature from command /scoreboard players tag .
The way this command works is
/scoreboard players tag {TARGET SELECTOR} add/remove/list {TAG NAME, MAKE IT FOLLOW MC'S STRICT NAMING POLICY} {PLAYER/ENTITY DATATAG}
(Data tags for players can be found on Google with the search "Player.dat". For entities, search "Chunk format entity format".
In this case, if I want to detect a player who is in the OverWorld, you can use the {Dimension:0} for the last argument in the command, for example:
/scoreboard players tag @a add inOverworld {Dimension:0}
Now players who are in the OverWorld will have this tag. How to detect players with this tag? No worries! Here's the command:
/testfor @a[tag=inOverWorld]
The way this command works is
/scoreboard players tag {TARGET SELECTOR} add/remove/list {TAG NAME, MAKE IT FOLLOW MC'S STRICT NAMING POLICY} {PLAYER/ENTITY DATATAG}
(Data tags for players can be found on Google with the search "Player.dat". For entities, search "Chunk format entity format".
In this case, if I want to detect a player who is in the OverWorld, you can use the {Dimension:0} for the last argument in the command, for example:
/scoreboard players tag @a add inOverworld {Dimension:0}
Now players who are in the OverWorld will have this tag. How to detect players with this tag? No worries! Here's the command:
/testfor @a[tag=inOverWorld]
Dang I wish I could help I have no idea Sorry
Thanks for the help, I really appreciate it!
Could we all please get the understanding between @e and @a?!
@e = all entities, that means items, mobs, and other movable things.
@a = all players
Simply run this is a repeating, unconditional and always active command block:
/testfor @a[r=#]
As stated before, r stands for the radius with the command block at it's center.
The command provided by BRASHEXODUS tests for ANYTHING within a 1 block radius (basically a cross shape, 3 blocks wide) of the coords in the command. The x, y and z arguments move the center of the sphere and if not provided, the command block is the center.
Use /gamerule commandBlockOuput false to hide the spam
Use /gamerule logAdminCommands false to reduce lag.
@e = all entities, that means items, mobs, and other movable things.
@a = all players
Simply run this is a repeating, unconditional and always active command block:
/testfor @a[r=#]
As stated before, r stands for the radius with the command block at it's center.
The command provided by BRASHEXODUS tests for ANYTHING within a 1 block radius (basically a cross shape, 3 blocks wide) of the coords in the command. The x, y and z arguments move the center of the sphere and if not provided, the command block is the center.
Use /gamerule commandBlockOuput false to hide the spam
Use /gamerule logAdminCommands false to reduce lag.
what you should do is grab a command block. set it as repeat unconditional and always active. then to get the "testfor" to work for 1.11.2 that i found out. is you need actual cords so do something like this /testfor @e[x=1985,y=33,z=1916,r=1]
the r=1 means how far you are from the command block i put it at that so i can be just 1 block above it. works like a charm. after its set you'll need a comparetor coming out of the block after the comparator add a repeater then add some redstone or more repeaters hooking into that specific command block you need c: if you need any help just pm me c:
the r=1 means how far you are from the command block i put it at that so i can be just 1 block above it. works like a charm. after its set you'll need a comparetor coming out of the block after the comparator add a repeater then add some redstone or more repeaters hooking into that specific command block you need c: if you need any help just pm me c:
Thank you BRASHEXODUS, it was very helpful. But there is one problem: when I stand on the spot I've selected, the command block does what it's supposed to, but if I stay on that block for any more than half a second, it starts spamming in the chat "Found Bjornemannen".
Do you know a way to fix this. Answer ASAP.
Thank you.
Do you know a way to fix this. Answer ASAP.
Thank you.
in 1.11 it would be /testfor @e[type=player], but this is the same as /testfor @a.
Hey if you're having trouble do /testfor @e[r=(number)] or if you want to do this for a specific player do /testfor @e[name=(playername),r=(number)]
does /testfor @e[type=Player] work?
[deleted]
[deleted]
