How do I make a custom command have output?

Started by leveljaap on

Topic category: Help with modding (Java Edition)

Last seen on 22:33, 21. Dec 2018
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make a custom command have output?

Hello,

I appreciate the removal of the "Answer field" for commands and the procedure function that replaced it, but now I have no idea how to make a command have output. I tried to let it send a message to provided entity but then it says that the world dependancy is somehow not provided. Even if it would work, I am not trying to send a message, I just want an output that I can do something with. So when the command is executed in a command block and commandblockoutput is on false, the output must be visible inside the command block but not in chat. That kind of output. Can anyone tell me how to do this?

Thanks in advance.

You can use the send chat to…
Fri, 12/07/2018 - 21:01

You can use the send chat to player procedure block in the command procedure to send any data back to the player.

Last seen on 22:33, 21. Dec 2018
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That works when a player is…
Tue, 12/11/2018 - 08:41

That works when a player is executing the command but I am working with ComputerCraft's command computers, which can't get the output this way. This way the output becomes a simple chat message and is not seen as output. A command computer is not an entity and can therefore not receive a chat message so it can't read the output. This means I can't do anything with it.

I would suggest that commands actually have an output instead of sending chat messages.