Saving command outputs as Variables

Started by Mindthemoods on

Topic category: Feature requests and ideas for MCreator

Last seen on 20:43, 20. Aug 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Saving command outputs as Variables

I've seen this problem mentioned a few times, and I've recently run into a couple situations where something like this would be handy: essentially, the ability to run a command and get its output as a string or number variable. Possibly a bit of an edge case thing, given that entity NBT is the main thing this would be useful for, and it's already covered by NBT functions; but for, say, processing large data tags, (say, messing with arbitrary Villager Trade data), could be helpful. (This was prompted by needing a means of location a biome and saving its location as a variable- getting the output of the /biome command would be quite helpful.) 

I believe this might be possible with /data, but I'm not 100% sure how I'd go about using it. To the best of my knowledge, this isn't a currently possible in the latest version of MCreator.