Is it possible to make a Player go only backwards?

Solution 1:

Ok, after some (5-10hrs) work I got a solution:

The Super RS Stuff Thing

Now, what the numbered parts are:

  1. Button switch - one button press is like a lever switch
  2. Fast Redstone clock (minimal repeater delay)
  3. Piston that turns the system on; the repeater is essential, otherwise the piston will go on-off-on on button press
  4. Command blocks, each part has these four commands:

/execute @a[ry=112,rym=-112] ~ ~ ~ fill ~ ~ ~+1 ~ ~+1 ~+1 minecraft:barrier 0 replace minecraft:air

/execute @a[ry=22,rym=157] ~ ~ ~ fill ~+1 ~ ~ ~+1 ~+1 ~ minecraft:barrier 0 replace minecraft:air

/execute @a[ry=-67,rym=68] ~ ~ ~ fill ~ ~ ~-1 ~ ~+1 ~-1 minecraft:barrier 0 replace minecraft:air

/execute @a[ry=-158,rym=-22] ~ ~ ~ fill ~-1 ~ ~ ~-1 ~+1 ~ minecraft:barrier 0 replace minecraft:air

  1. Finally, this last Command Block resets the whole cycle:

/execute @a ~ ~ ~ fill ~-5 ~-2 ~-5 ~+5 ~+2 ~+5 minecraft:air 0 replace minecraft:barrier 0

Notes:

  • all repeaters must be set to minimum delay
  • the lower #4 command blocks are not connected with a repeater, the upper ones are.
  • all the Pistons are Sticky Pistons
  • the system will not delete the remaining Barrier blocks when turned off; It's better to use this:

The Super Ultimate RS

  • I recommend to use "minecraft:stained_glass 4" instead of "minecraft:barrier 0", if the player breaks it, a new glass block appears almost instantly.
  • It's convertable to use the 1.9 chain command block feature, but I don't recommend it because of different repeat frequency.
  • The system is reliable - you can't move forwards whatever you try.
  • Even if you are falling/flying upwards/sprinting/potion sped up, the barrier block(s) farther from you will be deleted.
  • You can try it yourself and use/test/edit it! - let's say, it could look like this:

The best RS thing ever

The Command block next to the Button has this inside:

/clone XYZLeftChest XYZLeftChest XYZWool

The other two new Command blocks reset the cycle:

/setblock XYZChestUnderHopper minecraft:chest

/setblock XYZWool minecraft:air

Inside the left Chest place some items for signal length.

Solution 2:

Without mod or client consent to play fair I think this is NOT possible.

What would work:

You would need to override behaviour of keyboard input for directions you don't want to let clients use. That can be done by some mod, however you stated that you don't want to do so. And probably it would be kinda hard after all.

The second method is to define it as a map rule (so player goes to Option and disables said keys) and expect that they will do so , same as you expect they won't turn on cheats or break blocks.


The problem is that no command can compare player's look angle and his movement nor detect key presses. We can detect the final states of actions (change in XYZ, etc), but not HOW it was done (was the player pushed, or walked on his own?), because all that client sends in packets is the change of position, not the method how it was done.