Hey
I was looking at sethblings video on a jetpack using /tellraw and was wondering if it was possible to do that but with buttons like pressing the spacebar to go up?
Or if not that how to test if a player is on the ground
There's no way to detect keyboard input. Though you can detect if the player jumps
To detect if the player is on ground
/testfor @p {OnGround:1}
Thanks but it says "Found rastus22" everytime and will always emit a redstone signal.
Also, changing "OnGround" to any word will not change the output.
Hey
I was looking at sethblings video on a jetpack using /tellraw and was wondering if it was possible to do that but with buttons like pressing the spacebar to go up?
Or if not that how to test if a player is on the ground
Thanks, Rastus22
However, what you could do is check the hotbar slot the player has selected:
/testfor @a {SelectedItemSlot:0}
This will check if the player has the first slot on the hotbar selected. This doesn't necessarily mean the player would be pressing the numbers on the keyboard to change slot, but it's certainly a start. You could assign different slots to different functions, removing the need to click on the chat.
Thanks but it says "Found rastus22" everytime and will always emit a redstone signal.
Also, changing "OnGround" to any word will not change the output.
The "OnGround" tag requires its tag-type to be labeled. In this case, it's a tag-type of 'byte', thus labeled with 'b':
However, what you could do is check the hotbar slot the player has selected:
/testfor @a {SelectedItemSlot:0}
This will check if the player has the first slot on the hotbar selected. This doesn't necessarily mean the player would be pressing the numbers on the keyboard to change slot, but it's certainly a start. You could assign different slots to different functions, removing the need to click on the chat.
The "OnGround" tag requires its tag-type to be labeled. In this case, it's a tag-type of 'byte', thus labeled with 'b':
/testfor @p {OnGround:1b}
I used /testfor @p[SelectedItemSlot=8]
and got this
[16:32:07] rastus22 did not match the required data structure
Thanks Guys
One more thing,
Is it possible to use /summon with at a location relative to the player.
I used /testfor @p[SelectedItemSlot=8]
and got this
[16:32:07] rastus22 did not match the required data structure
You're adding the tag to the player selector parameters, which doesn't belong there. The correct syntax:
/testfor <player/selector> {dataTags}
So you'd be using:
/testfor @a {SelectedItemSlot:8}
EDIT:
The /summon command does not directly support relative player spawning, but you could summon a mob and then teleport it to a player using the /tp command:
/testfor @a [SelectedItemSlot:8]
gives me this
[16:47:20] Data tag parsing failed: Unable to locate name/value separator for string: [SelectedItemSlot:8]
I get the same answer if i use this
/testfor @a [SelectedItemSlot=8]
And with
/testfor @p[OnGround=1b]
It works but for the power to turn off after it is false i have to right click the command block and then press done.
/testfor @a [SelectedItemSlot:8]
gives me this
[16:47:20] Data tag parsing failed: Unable to locate name/value separator for string: [SelectedItemSlot:8]
I get the same answer if i use this
/testfor @a [SelectedItemSlot=8]
You need to use curly brackets, not square brackets.
And with
/testfor @p[OnGround=1b]
It works but for the power to turn off after it is false i have to right click the command block and then press done.
It doesn't actually work. The signal will always return true; you're putting an invalid parameter into the player selectors, which forces the output to always be true, even if you're flying.
EDIT:
Player selectors work in this manner:
@a[x=15,y=1,z=16,r=5,score_TEST_min=1]
The parameters are not NBT tags. dataTags in applicable commands would look like the following:
{SelectedItemSlot:8}
dataTags come after the player selector in the /testfor command:
Turns out that sqaure brackets work if you do this /testfor @a[SelectedItemSlot:8]
Parameters that are invalid will return true no matter what, so that does not work. Parameters in player selectors do not support NBT tags. You can find the full list of valid parameters here: http://minecraft.gamepedia.com/Command_block#Arguments
Please see the edited post above for an explanation on how to use dataTags in the /testfor command.
is it possible to teleport the entity to just above me
for example if am at the coords 1 1 1 it would go to 1 10 1
but works at any coords
this is because the entity teleports to about 10 blocks below me
I was looking at sethblings video on a jetpack using /tellraw and was wondering if it was possible to do that but with buttons like pressing the spacebar to go up?
Or if not that how to test if a player is on the ground
Thanks, Rastus22
To detect if the player is on ground
Thanks but it says "Found rastus22" everytime and will always emit a redstone signal.
Also, changing "OnGround" to any word will not change the output.
However, what you could do is check the hotbar slot the player has selected:
This will check if the player has the first slot on the hotbar selected. This doesn't necessarily mean the player would be pressing the numbers on the keyboard to change slot, but it's certainly a start. You could assign different slots to different functions, removing the need to click on the chat.
The "OnGround" tag requires its tag-type to be labeled. In this case, it's a tag-type of 'byte', thus labeled with 'b':
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
One more thing,
Is it possible to use /summon with at a location relative to the player.
I used /testfor @p[SelectedItemSlot=8]
and got this
[16:32:07] rastus22 did not match the required data structure
You're adding the tag to the player selector parameters, which doesn't belong there. The correct syntax:
So you'd be using:
EDIT:
The /summon command does not directly support relative player spawning, but you could summon a mob and then teleport it to a player using the /tp command:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
gives me this
[16:47:20] Data tag parsing failed: Unable to locate name/value separator for string: [SelectedItemSlot:8]
I get the same answer if i use this
/testfor @a [SelectedItemSlot=8]
And with
/testfor @p[OnGround=1b]
It works but for the power to turn off after it is false i have to right click the command block and then press done.
You need to use curly brackets, not square brackets.
It doesn't actually work. The signal will always return true; you're putting an invalid parameter into the player selectors, which forces the output to always be true, even if you're flying.
EDIT:
Player selectors work in this manner:
The parameters are not NBT tags. dataTags in applicable commands would look like the following:
dataTags come after the player selector in the /testfor command:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
/testfor @a[SelectedItemSlot:8]
Parameters that are invalid will return true no matter what, so that does not work. Parameters in player selectors do not support NBT tags. You can find the full list of valid parameters here: http://minecraft.gamepedia.com/Command_block#Arguments
Please see the edited post above for an explanation on how to use dataTags in the /testfor command.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
I think its finally working
for example if am at the coords 1 1 1 it would go to 1 10 1
but works at any coords
this is because the entity teleports to about 10 blocks below me
Two command blocks: The first one to teleport the entity to you, the second to teleport it 10 blocks up.
The second one would have to activate slightly after the first.
████████░░██░░░░░░░░████████░░██░░░░░░██░░████████░░██░░░░░░██░░██████░░░░████████░░██████░░░░░░████░░░░██████░░░░██████████
██░░░░██░░██░░░░░░░░██░░░░░░░░░░██░░██░░░░██░░░░██░░████░░░░██░░██░░░░██░░██░░░░░░░░██░░░░██░░██░░░░██░░██░░░░██░░░░░░██░░░░
██░░░░██░░██░░░░░░░░██░░░░░░░░░░██░░██░░░░██░░░░██░░██░░██░░██░░██░░░░██░░██░░░░░░░░██░░░░██░░██░░░░░░░░██░░░░██░░░░░░██░░░░
████████░░██░░░░░░░░████████░░░░░░██░░░░░░████████░░██░░██░░██░░██░░░░██░░████████░░██████░░░░██████░░░░██████░░░░░░░░██░░░░
██░░░░██░░██░░░░░░░░██░░░░░░░░░░██░░██░░░░██░░░░██░░██░░██░░██░░██░░░░██░░██░░░░░░░░██░░░░██░░██░░░░██░░██░░░░██░░░░░░██░░░░
██░░░░██░░██░░░░░░░░██░░░░░░░░░░██░░██░░░░██░░░░██░░██░░░░████░░██░░░░██░░██░░░░░░░░██░░░░██░░██░░░░██░░██░░░░██░░░░░░██░░░░
██░░░░██░░████████░░████████░░██░░░░░░██░░██░░░░██░░██░░░░░░██░░██████░░░░████████░░██░░░░██░░░░████░░░░██░░░░██░░██████████