Skip to content

Instantly share code, notes, and snippets.

@stwalkerster
Last active December 18, 2015 01:39
Show Gist options
  • Save stwalkerster/5705350 to your computer and use it in GitHub Desktop.
Save stwalkerster/5705350 to your computer and use it in GitHub Desktop.

These are the commands for the command blocks needed for each stage of the ticket barrier system, in order. They do require some specific wiring, usually using comparators/repeaters etc (especially for buying tickets/railcards).

I plan on adding wiring diagrams to these at some later point. Question marks indicate values that need to be changed for every set of systems. Relative points for x/z coords are accepted - these are left out entirely.

ticket buy
/xp -1L @p[x=??,y=??,r=2,lm=1,team=]
/scoreboard players add @p[r=2,z=??,y=??] ticket 1
railcard buy
/xp -10L @p[x=??,y=??,r=2,lm=10,team=]
/scoreboard players set @p[r=2,z=??,y=??] ticket 1
/scoreboard teams join railcard @p[r=2,z=??,y=??]
ticket barrier
/testfor @p[y=??,r=1,score_ticket=0]
/scoreboard players remove @p[y=??,r=2,team=,score_ticket_min=1] ticket 1
ticket buy
/xp -1L @p[x=-271,y=64,r=2,lm=1,team=]
/scoreboard players add @p[r=2,x=-271,y=64] ticket 1
railcard buy
/xp -10L @p[x=-271,y=64,r=2,lm=10,team=]
/scoreboard players set @p[r=2,x=-271,y=64] ticket 1
/scoreboard teams join railcard @p[r=2,x=-271,y=64]
ticket barrier
/testfor @p[y=64,r=1,score_ticket=0]
/scoreboard players remove @p[y=64,r=2,team=,score_ticket_min=1] ticket 1
ticket buy
/xp -1L @p[z=115,y=64,r=2,lm=1,team=]
/scoreboard players add @p[r=2,z=115,y=64] ticket 1
railcard buy
/xp -10L @p[z=115,y=64,r=2,lm=10,team=]
/scoreboard teams join railcard @p[r=2,z=115,y=64]
/scoreboard players set @p[r=2,z=115,y=64] ticket 1
ticket barrier
/testfor @p[y=66,r=2,score_ticket=0]
/scoreboard players remove @p[y=66,r=2,team=,score_ticket_min=1] ticket 1
ticket buy
/xp -1L @p[x=-455,y=65,r=2,lm=1,team=]
/scoreboard players add @p[r=2,x=-455,y=65] ticket 1
railcard buy
/xp -10L @p[x=-455,y=65,r=2,lm=10,team=]
/scoreboard teams join railcard @p[r=2,x=-455,y=65]
/scoreboard players set @p[r=2,x=-455,y=65] ticket 1
ticket barrier
/testfor @p[y=65,r=1,score_ticket=0]
/scoreboard players remove @p[y=65,r=2,team=,score_ticket_min=1] ticket 1
ticket buy
/xp -1L @p[z=-32,y=67,r=2,lm=1,team=]
/scoreboard players add @p[r=2,z=-32,y=67] ticket 1
railcard buy
/xp -10L @p[z=-32,y=67,r=2,lm=10,team=]
/scoreboard teams join railcard @p[r=2,z=-32,y=67]
/scoreboard players set @p[r=2,z=-32,y=67] ticket 1
ticket barrier
/testfor @p[y=67,r=1,score_ticket=0]
/scoreboard players remove @p[y=67,r=2,team=,score_ticket_min=1] ticket 1
/weather clear
/time set 1500
daylight sensor -> 12 redstone wires -> 2 not gates -> 2 command blocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment