This is the PocketMine plugin that implements the Redstone circuit.
Forge mod for Minecraft that adds many tiny redstone pieces that you can...