Clouds Clouds Airship Belthil Tower Nether Temple
Website maintenance in progress

Win a free journey on the STA Railways network

Options
Lord, Arbiter, Engineer
  1. Read this: https://gaming.stackexchange.com/questions/274911/how-do-i-delay-a-command
  2. Adapt it to detect when a minecart passes over a specific kind of block
  3. Make minecarts stop for X seconds when they pass over the specific kind of block (Redstone ore?) — constantly teleport the minecart to its current coordinates??
  4. Stop teleporting the minecart to itself, and it should continue

Can you crack it?

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • Options
    Do the commands need to be active all the time, and work for any minecart that passes over redstone ore?
  • Lord, Arbiter, Engineer
    edited June 2017
    Options
    Do the commands need to be active all the time, and work for any minecart that passes over redstone ore?

    yes. using repeater/chain command blocks.

    delay should be 3 seconds (~60 ticks).
  • Wiki Editor
    Options
    you use traincarts
  • Options
    Done.
    0CC6R8m.png
    Total:
    5 repeating blocks, 6 chain blocks
    Usage:
    Iron block to stall, iron ore a few blocks in front to clean up tags.
    Run once:
    /scoreboard objectives add time dummy
    From right <<to<< left:

    Repeats (Unconditional, no redstone):
    /scoreboard players add @e[score_time_min=1] time 1
    /kill @e[score_time_min=DELAY_IN_TICKS,tag=stuck]
    /execute @e[type=Armor_stand,tag=stuck] ~ ~ ~ tp @e[type=Minecart,tag=stalled,r=0.4] @e[type=Armor_stand,tag=stuck,r=0]
    Bottom:
    /execute @e[type=Minecart] ~ ~ ~ detect ~ ~-1 ~ minecraft:iron_block 0 /scoreboard players tag @e[type=Minecart,r=0.1,tag=!stalled] add stall
    Top:
    /execute @e[type=Minecart] ~ ~ ~ detect ~ ~-1 ~ minecraft:iron_ore 0 /scoreboard players tag @e[type=Minecart,r=0.1,tag=stalled] remove stalled

    Chains (all chains set to Conditional, no redstone):
    /execute @e[type=Minecart,tag=stall] ~ ~ ~ /summon Armor_stand ~ ~ ~ {Tags:["stucking"],NoAI:1,NoGravity:1,Invisible:1,Invulnerable:1}
    /execute @e[type=Minecart,tag=stall] ~ ~ ~ scoreboard players tag @e[type=Minecart,tag=stall,r=0.1] add stalled
    /execute @e[type=Minecart,tag=stall] ~ ~ ~ scoreboard players tag @e[type=Minecart,tag=stall,r=0.1] remove stall
    /scoreboard players set @e[tag=stucking,type=Armor_stand] time 1
    /scoreboard players tag @e[tag=stucking,type=Armor_stand] add stuck
    /scoreboard players tag @e[tag=stucking,type=Armor_stand] remove stucking

    Problems:
    Does not work when multiple carts on the same track (ie if a second cart arrives before the first one leaves, the system breaks.
    When the system breaks, it leaves a bunch of invulnerable, invisible armor stands.
    -However, this can be fixed by simply exiting the cart or otherwise destroying the cart.

    Notes for Andy:
    Remember to use minecraft:tp on servers.
    Remember to check for invisible characters.

Welcome!

It looks like you're new here. Sign in or register to get started.