Command Block Peripheral 0.0.3
This add-on will allow vanilla command blocks to interact with ComputerCraft computers.
The command block will work the same as any other peripheral.
Methods:
cmd.setCommand(String newcmd) (sets the command on the command block)
cmd.runCommand() (runs the command that is in the command block)
cmd.runCommand(String cmd) (runs the given command)
cmd.getPlayers(String targetselectors) (returns a string that contains username(s))
How target selectors work: https://gist.github.com/3736487
examples:
cmd = peripheral.wrap("left") mon = peripheral.wrap("right") mon.clear() mon.write("Hello, "..cmd.getPlayers("@p").."!")
cmd = peripheral.wrap("left") cmd.setCommand("Time set day") cmd.runCommand()
cmd = peripheral.wrap("left") cmd.runCommand("give @r 137")
Download:
commandblockperipheral_0.0.3 (universal)
Requirements:
- ComputerCraft 1.46
- Minecraft Forge (compiled with Forge 6.0.1.341)
Installation:
Download the zip file, put it in your mods folder.
Extra information:
- This mod can be used as a serverside mod and doesn't require you to have the client installed.
- This mod doesn't edit baseclasses nor does it use a block ID.