Create the command block

Started by HorizonGamma on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Create the command block

I want to create a block that looks like the command block that already comes with Minecraft. The feature I would like to copy is its ability to store information. Please, I need help.

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
make a block with the same…
Sun, 01/28/2024 - 20:38

make a block with the same textures, make a new gui with text field and buttons (save and run) when you click save, it will get the text field ad save it as an nbt (enable block nbt) and when the block is open it should input into the text field that nbt text value, (if there is no way to already save it) then clicking run will take the text, and use the "execute command" block (replace the "clear" with the text field) and that should work, you could also make it so when it is powered by redstone it will keep running that nbt value instead of the text field (since you it wont save if it's not open)

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you very much for your…
Fri, 02/02/2024 - 14:34

Thank you very much for your response. I think I had an idea similar to that but the problem was that by placing 2 of these blocks what I wrote in block 1 was reflected in block 2, which is an undesirable result.