The Meaning of Life, the Universe, and Everything.
Location:
vdsgjsıgfjdsjgfiklrgjtw
Join Date:
11/24/2016
Posts:
94
Location:
gfesgfsdgretrfds
Minecraft:
AndroidOyunClub
Member Details
execute as @a at @s if block ~1 ~ ~ minecraft:command_block run gamemode survival execute as @a at @s if block ~-1 ~ ~ minecraft:command_block run gamemode survival execute as @a at @s if block ~ ~ ~1 minecraft:command_block run gamemode survival execute as @a at @s if block ~ ~ ~-1 minecraft:command_block run gamemode survival execute as @a at @s if block ~ ~1 ~ minecraft:command_block run gamemode survival execute as @a at @s if block ~ ~-1 ~ minecraft:command_block run gamemode survival execute as @a at @s if block ~1 ~ ~ minecraft:chain_command_block run gamemode survival execute as @a at @s if block ~-1 ~ ~ minecraft:chain_command_block run gamemode survival execute as @a at @s if block ~ ~ ~1 minecraft:chain_command_block run gamemode survival execute as @a at @s if block ~ ~ ~-1 minecraft:chain_command_block run gamemode survival execute as @a at @s if block ~ ~1 ~ minecraft:chain_command_block run gamemode survival execute as @a at @s if block ~ ~-1 ~ minecraft:chain_command_block run gamemode survival execute as @a at @s if block ~1 ~ ~ minecraft:repeater_command_block run gamemode survival execute as @a at @s if block ~-1 ~ ~ minecraft:repeater_command_block run gamemode survival execute as @a at @s if block ~ ~ ~1 minecraft:repeater_command_block run gamemode survival execute as @a at @s if block ~ ~ ~-1 minecraft:repeater_command_block run gamemode survival execute as @a at @s if block ~ ~1 ~ minecraft:repeater_command_block run gamemode survival execute as @a at @s if block ~ ~-1 ~ minecraft:repeater_command_block run gamemode survival execute as @a at @s if block ~1 ~ ~ minecraft:command_block run gamemode creative execute as @a at @s if block ~-1 ~ ~ minecraft:command_block run gamemode creative execute as @a at @s if block ~ ~ ~1 minecraft:command_block run gamemode creative execute as @a at @s if block ~ ~ ~-1 minecraft:command_block run gamemode creative execute as @a at @s if block ~ ~1 ~ minecraft:command_block run gamemode creative execute as @a at @s if block ~ ~-1 ~ minecraft:command_block run gamemode creative execute as @a at @s if block ~1 ~ ~ minecraft:chain_command_block run gamemode creative execute as @a at @s if block ~-1 ~ ~ minecraft:chain_command_block run gamemode creative execute as @a at @s if block ~ ~ ~1 minecraft:chain_command_block run gamemode creative execute as @a at @s if block ~ ~ ~-1 minecraft:chain_command_block run gamemode creative execute as @a at @s if block ~ ~1 ~ minecraft:chain_command_block run gamemode creative execute as @a at @s if block ~ ~-1 ~ minecraft:chain_command_block run gamemode creative execute as @a at @s if block ~1 ~ ~ minecraft:repeater_command_block run gamemode creative execute as @a at @s if block ~-1 ~ ~ minecraft:repeater_command_block run gamemode creative execute as @a at @s if block ~ ~ ~1 minecraft:repeater_command_block run gamemode creative execute as @a at @s if block ~ ~ ~-1 minecraft:repeater_command_block run gamemode creative execute as @a at @s if block ~ ~1 ~ minecraft:repeater_command_block run gamemode creative execute as @a at @s if block ~ ~-1 ~ minecraft:repeater_command_block run gamemode creative
The Meaning of Life, the Universe, and Everything.
Join Date:
1/26/2018
Posts:
48
Member Details
Try updating the gamemode command to look like this:
gamemode creative @s
So, the lines will look like this:
execute as @a at @s if block ~1 ~ ~ minecraft:command_block run gamemode survival @s
I feel like that should work, but I'm not testing it. If it doesn't, maybe try running it in a command block to start, to see what the command block outputs as an error (since datapacks don't really give much feedback). I have a feeling it's not liking the lack of target selector in the gamemode command, since it's not being run from the chat line.
execute as @a at @s if block ~1 ~ ~ minecraft:command_block run gamemode survival @s
execute as @a at @s if block ~-1 ~ ~ minecraft:command_block run gamemode survival @s
execute as @a at @s if block ~ ~ ~1 minecraft:command_block run gamemode survival @s
execute as @a at @s if block ~ ~ ~-1 minecraft:command_block run gamemode survival @s
execute as @a at @s if block ~ ~1 ~ minecraft:command_block run gamemode survival @s
execute as @a at @s if block ~ ~-1 ~ minecraft:command_block run gamemode survival @s
execute as @a at @s if block ~1 ~ ~ minecraft:chain_command_block run gamemode survival @s
execute as @a at @s if block ~-1 ~ ~ minecraft:chain_command_block run gamemode survival @s
execute as @a at @s if block ~ ~ ~1 minecraft:chain_command_block run gamemode survival @s
execute as @a at @s if block ~ ~ ~-1 minecraft:chain_command_block run gamemode survival @s
execute as @a at @s if block ~ ~1 ~ minecraft:chain_command_block run gamemode survival @s
execute as @a at @s if block ~ ~-1 ~ minecraft:chain_command_block run gamemode survival @s
execute as @a at @s if block ~1 ~ ~ minecraft:repeating_command_block run gamemode survival @s
execute as @a at @s if block ~-1 ~ ~ minecraft:repeating_command_block run gamemode survival @s
execute as @a at @s if block ~ ~ ~1 minecraft:repeating_command_block run gamemode survival @s
execute as @a at @s if block ~ ~ ~-1 minecraft:repeating_command_block run gamemode survival @s
execute as @a at @s if block ~ ~1 ~ minecraft:repeating_command_block run gamemode survival @s
execute as @a at @s if block ~ ~-1 ~ minecraft:repeating_command_block run gamemode survival @s
execute as @a at @s if block ~1 ~ ~ minecraft:command_block run gamemode creative @s
execute as @a at @s if block ~-1 ~ ~ minecraft:command_block run gamemode creative @s
execute as @a at @s if block ~ ~ ~1 minecraft:command_block run gamemode creative @s
execute as @a at @s if block ~ ~ ~-1 minecraft:command_block run gamemode creative @s
execute as @a at @s if block ~ ~1 ~ minecraft:command_block run gamemode creative @s
execute as @a at @s if block ~ ~-1 ~ minecraft:command_block run gamemode creative @s
execute as @a at @s if block ~1 ~ ~ minecraft:chain_command_block run gamemode creative @s
execute as @a at @s if block ~-1 ~ ~ minecraft:chain_command_block run gamemode creative @s
execute as @a at @s if block ~ ~ ~1 minecraft:chain_command_block run gamemode creative @s
execute as @a at @s if block ~ ~ ~-1 minecraft:chain_command_block run gamemode creative @s
execute as @a at @s if block ~ ~1 ~ minecraft:chain_command_block run gamemode creative @s
execute as @a at @s if block ~ ~-1 ~ minecraft:chain_command_block run gamemode creative @s
execute as @a at @s if block ~1 ~ ~ minecraft:repeating_command_block run gamemode creative @s
execute as @a at @s if block ~-1 ~ ~ minecraft:repeating_command_block run gamemode creative @s
execute as @a at @s if block ~ ~ ~1 minecraft:repeating_command_block run gamemode creative @s
execute as @a at @s if block ~ ~ ~-1 minecraft:repeating_command_block run gamemode creative @s
execute as @a at @s if block ~ ~1 ~ minecraft:repeating_command_block run gamemode creative @s
execute as @a at @s if block ~ ~-1 ~ minecraft:repeating_command_block run gamemode creative @s
What I did is I Changed minecraft:repeater_command_block to the actual ID: minecraft:repeating_command_block, also I added the player that it's changing the gamemode of.
execute as @a at @s will run the command as the player, but at the command block, or at whatever is running the function.
so to alter the command try:
execute as @a run execute as @s at @s run execute as @s if block x y z minecraft:command_block run gamemode creative @s
or something like this...
Also, as mentioned above, make sure that your blocks are correct. As "repeater_command_block" is not a block.
That results in two unnecessary lookups.
When you do execute as @a, you are instantly telling the command "from here on out, execute as this player". So, when it comes to at @s, it is executing it as the player.
The result basically tells the game: Execute this command as this player, at that players location (since they are the one executing the command).
The code execute as @a at @s if block ~1 ~ ~ minecraft:command_block run gamemode survival @s will work.
Breakdown:
As all players, at that players location, if the block to the side is a command block, execute the command "gamemode survival" for that player.
Command working in game but if It is in function it isn't work.(when I test with only /say command it's work)
Is there trouble with command?
(Sorry for my bad english )
Can you post the actual function text?
execute as @a at @s if block ~1 ~ ~ minecraft:command_block run gamemode survival
execute as @a at @s if block ~-1 ~ ~ minecraft:command_block run gamemode survival
execute as @a at @s if block ~ ~ ~1 minecraft:command_block run gamemode survival
execute as @a at @s if block ~ ~ ~-1 minecraft:command_block run gamemode survival
execute as @a at @s if block ~ ~1 ~ minecraft:command_block run gamemode survival
execute as @a at @s if block ~ ~-1 ~ minecraft:command_block run gamemode survival
execute as @a at @s if block ~1 ~ ~ minecraft:chain_command_block run gamemode survival
execute as @a at @s if block ~-1 ~ ~ minecraft:chain_command_block run gamemode survival
execute as @a at @s if block ~ ~ ~1 minecraft:chain_command_block run gamemode survival
execute as @a at @s if block ~ ~ ~-1 minecraft:chain_command_block run gamemode survival
execute as @a at @s if block ~ ~1 ~ minecraft:chain_command_block run gamemode survival
execute as @a at @s if block ~ ~-1 ~ minecraft:chain_command_block run gamemode survival
execute as @a at @s if block ~1 ~ ~ minecraft:repeater_command_block run gamemode survival
execute as @a at @s if block ~-1 ~ ~ minecraft:repeater_command_block run gamemode survival
execute as @a at @s if block ~ ~ ~1 minecraft:repeater_command_block run gamemode survival
execute as @a at @s if block ~ ~ ~-1 minecraft:repeater_command_block run gamemode survival
execute as @a at @s if block ~ ~1 ~ minecraft:repeater_command_block run gamemode survival
execute as @a at @s if block ~ ~-1 ~ minecraft:repeater_command_block run gamemode survival
execute as @a at @s if block ~1 ~ ~ minecraft:command_block run gamemode creative
execute as @a at @s if block ~-1 ~ ~ minecraft:command_block run gamemode creative
execute as @a at @s if block ~ ~ ~1 minecraft:command_block run gamemode creative
execute as @a at @s if block ~ ~ ~-1 minecraft:command_block run gamemode creative
execute as @a at @s if block ~ ~1 ~ minecraft:command_block run gamemode creative
execute as @a at @s if block ~ ~-1 ~ minecraft:command_block run gamemode creative
execute as @a at @s if block ~1 ~ ~ minecraft:chain_command_block run gamemode creative
execute as @a at @s if block ~-1 ~ ~ minecraft:chain_command_block run gamemode creative
execute as @a at @s if block ~ ~ ~1 minecraft:chain_command_block run gamemode creative
execute as @a at @s if block ~ ~ ~-1 minecraft:chain_command_block run gamemode creative
execute as @a at @s if block ~ ~1 ~ minecraft:chain_command_block run gamemode creative
execute as @a at @s if block ~ ~-1 ~ minecraft:chain_command_block run gamemode creative
execute as @a at @s if block ~1 ~ ~ minecraft:repeater_command_block run gamemode creative
execute as @a at @s if block ~-1 ~ ~ minecraft:repeater_command_block run gamemode creative
execute as @a at @s if block ~ ~ ~1 minecraft:repeater_command_block run gamemode creative
execute as @a at @s if block ~ ~ ~-1 minecraft:repeater_command_block run gamemode creative
execute as @a at @s if block ~ ~1 ~ minecraft:repeater_command_block run gamemode creative
execute as @a at @s if block ~ ~-1 ~ minecraft:repeater_command_block run gamemode creative
Here's text
Thanks. I'll take a look. Eating dinner at the moment.
Ok thx.
??
Working weekend on the road. Been a long week. Sorry. Enjoying my night at the hotel bar. I'll get to it. I really don't mean to blow you off.
Ok. Just sat down at the desk here in the room. And my first question is - what are you trying to accomplish?
What it looks like that all is, you kinda get pushed into survival or creative or whatever mode. I don't really get the point.
Hmm thx
Try updating the gamemode command to look like this:
So, the lines will look like this:
I feel like that should work, but I'm not testing it. If it doesn't, maybe try running it in a command block to start, to see what the command block outputs as an error (since datapacks don't really give much feedback). I have a feeling it's not liking the lack of target selector in the gamemode command, since it's not being run from the chat line.
Try This:
execute as @a at @s if block ~1 ~ ~ minecraft:command_block run gamemode survival @s
execute as @a at @s if block ~-1 ~ ~ minecraft:command_block run gamemode survival @s
execute as @a at @s if block ~ ~ ~1 minecraft:command_block run gamemode survival @s
execute as @a at @s if block ~ ~ ~-1 minecraft:command_block run gamemode survival @s
execute as @a at @s if block ~ ~1 ~ minecraft:command_block run gamemode survival @s
execute as @a at @s if block ~ ~-1 ~ minecraft:command_block run gamemode survival @s
execute as @a at @s if block ~1 ~ ~ minecraft:chain_command_block run gamemode survival @s
execute as @a at @s if block ~-1 ~ ~ minecraft:chain_command_block run gamemode survival @s
execute as @a at @s if block ~ ~ ~1 minecraft:chain_command_block run gamemode survival @s
execute as @a at @s if block ~ ~ ~-1 minecraft:chain_command_block run gamemode survival @s
execute as @a at @s if block ~ ~1 ~ minecraft:chain_command_block run gamemode survival @s
execute as @a at @s if block ~ ~-1 ~ minecraft:chain_command_block run gamemode survival @s
execute as @a at @s if block ~1 ~ ~ minecraft:repeating_command_block run gamemode survival @s
execute as @a at @s if block ~-1 ~ ~ minecraft:repeating_command_block run gamemode survival @s
execute as @a at @s if block ~ ~ ~1 minecraft:repeating_command_block run gamemode survival @s
execute as @a at @s if block ~ ~ ~-1 minecraft:repeating_command_block run gamemode survival @s
execute as @a at @s if block ~ ~1 ~ minecraft:repeating_command_block run gamemode survival @s
execute as @a at @s if block ~ ~-1 ~ minecraft:repeating_command_block run gamemode survival @s
execute as @a at @s if block ~1 ~ ~ minecraft:command_block run gamemode creative @s
execute as @a at @s if block ~-1 ~ ~ minecraft:command_block run gamemode creative @s
execute as @a at @s if block ~ ~ ~1 minecraft:command_block run gamemode creative @s
execute as @a at @s if block ~ ~ ~-1 minecraft:command_block run gamemode creative @s
execute as @a at @s if block ~ ~1 ~ minecraft:command_block run gamemode creative @s
execute as @a at @s if block ~ ~-1 ~ minecraft:command_block run gamemode creative @s
execute as @a at @s if block ~1 ~ ~ minecraft:chain_command_block run gamemode creative @s
execute as @a at @s if block ~-1 ~ ~ minecraft:chain_command_block run gamemode creative @s
execute as @a at @s if block ~ ~ ~1 minecraft:chain_command_block run gamemode creative @s
execute as @a at @s if block ~ ~ ~-1 minecraft:chain_command_block run gamemode creative @s
execute as @a at @s if block ~ ~1 ~ minecraft:chain_command_block run gamemode creative @s
execute as @a at @s if block ~ ~-1 ~ minecraft:chain_command_block run gamemode creative @s
execute as @a at @s if block ~1 ~ ~ minecraft:repeating_command_block run gamemode creative @s
execute as @a at @s if block ~-1 ~ ~ minecraft:repeating_command_block run gamemode creative @s
execute as @a at @s if block ~ ~ ~1 minecraft:repeating_command_block run gamemode creative @s
execute as @a at @s if block ~ ~ ~-1 minecraft:repeating_command_block run gamemode creative @s
execute as @a at @s if block ~ ~1 ~ minecraft:repeating_command_block run gamemode creative @s
execute as @a at @s if block ~ ~-1 ~ minecraft:repeating_command_block run gamemode creative @s
What I did is I Changed minecraft:repeater_command_block to the actual ID: minecraft:repeating_command_block, also I added the player that it's changing the gamemode of.
I think I know the issue.
execute as @a at @s will run the command as the player, but at the command block, or at whatever is running the function.
so to alter the command try:
execute as @a run execute as @s at @s run execute as @s if block x y z minecraft:command_block run gamemode creative @s
or something like this...
Also, as mentioned above, make sure that your blocks are correct. As "repeater_command_block" is not a block.
YouTube: https://www.youtube.com/channel/UCzGDRYWcrGreMmQFo_d5N5Q
Facebook:https://goo.gl/s0r12d
Website:https://theusaf.weebly.com
JavaScript Projects: https://theusaf.github.io
Link Shortener: https://shortr.github.io
Twitter:https://www.twitter.com/theusafyt
That results in two unnecessary lookups.
When you do execute as @a, you are instantly telling the command "from here on out, execute as this player". So, when it comes to at @s, it is executing it as the player.
The result basically tells the game: Execute this command as this player, at that players location (since they are the one executing the command).
The code execute as @a at @s if block ~1 ~ ~ minecraft:command_block run gamemode survival @s will work.
Breakdown:
As all players, at that players location, if the block to the side is a command block, execute the command "gamemode survival" for that player.
THANKS