This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
JJRcop's profile picture

Peripheral for the Command block in MC 1.4

Started by JJRcop, 01 October 2012 - 03:57 PM
JJRcop #1
Posted 01 October 2012 - 05:57 PM
In Minecraft 1.4, there is a new block called the "Command Block". This is in vanilla minecraft, no mods required.
When powered, it executes the command stored inside of it.
It has no recipe, and therefore is only obtainable by ops of the server.
I was thinking of some sort of peripheral API to interact with it if it is placed beside a computer and wrapped.

This could be just one function,
cmdblock.write("command")
and would change the command that the block contains, the computer could then just simply output a redstone signal to activate the command block.

Before you say "But, that would be a security risk to the server!" Well, placing a computer next to a command block even without this peripheral API is a "security risk to the server" anyway, since it could output a redstone signal and activate the block.

An API like this would just expand the cappabilities of the computer with the command block.


If this is already planned let me know.
Edited on 01 October 2012 - 04:46 PM
GopherAtl #2
Posted 01 October 2012 - 06:06 PM
This is the exact same suggestion as the other thread. Why on earth did you feel the need to start another one?

Only thing I can imagine you might intend to be different is you may intend to only be able to change the parameters to the command and not the base command itself on the command block, but that's me grabbing at straws as nothing in your post suggests that's what you mean. Even if you did, it's not enough of a difference to warrant an entirely new suggestion thread.

:edit: Ah, I see. He was suggesting making a new block, you are not. Well, unless the people at mojang decided to implement computercraft's IPeripheral interface on the command block, a new block is pretty much required, I think? Might be able to replace the standard command blocks with IPeripheral versions, not really sure. Either way, my objections still stand - why new thread? It fragments the discussion about the suggestion for no reason.
nolongerexistant #3
Posted 01 October 2012 - 06:28 PM
I would like this too, but the command block uses a different syntax from CC so that might be really confusing to code :)/>/>
JJRcop #4
Posted 01 October 2012 - 06:47 PM
This is the exact same suggestion as the other thread. Why on earth did you feel the need to start another one?

Only thing I can imagine you might intend to be different is you may intend to only be able to change the parameters to the command and not the base command itself on the command block, but that's me grabbing at straws as nothing in your post suggests that's what you mean. Even if you did, it's not enough of a difference to warrant an entirely new suggestion thread.

:edit: Ah, I see. He was suggesting making a new block, you are not. Well, unless the people at mojang decided to implement computercraft's IPeripheral interface on the command block, a new block is pretty much required, I think? Might be able to replace the standard command blocks with IPeripheral versions, not really sure. Either way, my objections still stand - why new thread? It fragments the discussion about the suggestion for no reason.

Okay, I guess this is unnecessary. I'll request to delete it if it makes you happy.
immibis #5
Posted 02 October 2012 - 02:46 AM
They could just special-case the command block, you know. So if a block is a command block, it's a command block peripheral, otherwise if it implements IPeripheral, it's a custom peripheral.

This doesn't seem to fit in CC though.
GopherAtl #6
Posted 02 October 2012 - 02:55 AM
it's potentially very dangerous, but there are some viable applications. If it is sufficiently protected - like, encased in bedrock - a computer with a command block could provide an interface between rednet and economy systems, just as one example.
immibis #7
Posted 02 October 2012 - 06:25 AM
I meant it seemed better as an addon.