I ended up writing a MCEdit filter that will automatically generate command blocks.
Hi,
I'm wondering if there are tools that can help me generate custom command blocks. I'm working on a project that would require lots of nearly identical chains of command blocks with slight differences in the commands.
I'm looking for a way to kind of code this kind of generation, similar to how you can run python scripts in minecraft pi to generate blocks. I want to be able to code a script to place these command blocks into my world, instead of copying and pasting commands all the time.
I would suggest writing a Java Generator, or, do what I do, and write the main script out in a notepad with the differences you want labelled (like Tag1, Tag2, etc.) so that later you can use Find and Replace to replace Tag1 with whatever you want. It's weird to explain, so look here:
Example:
---
scoreboard players tag @a add Tag1 {SelectedItem:{id:"minecraft:Tag2"}}
execute @a[tag=Tag1] ~ ~ ~ effect @s Tag3 1 1
---
You could then use Find And Replace in Notepad or Google Docs to replace Tag1 with the tag name, Tag2 with the item, and Tag3 with the effect
I would suggest writing a Java Generator, or, do what I do, and write the main script out in a notepad with the differences you want labelled (like Tag1, Tag2, etc.) so that later you can use Find and Replace to replace Tag1 with whatever you want. It's weird to explain, so look here:
Example:
---
scoreboard players tag @a add Tag1 {SelectedItem:{id:"minecraft:Tag2"}}
execute @a[tag=Tag1] ~ ~ ~ effect @s Tag3 1 1
---
You could then use Find And Replace in Notepad or Google Docs to replace Tag1 with the tag name, Tag2 with the item, and Tag3 with the effect
You only pointed out how to generate these commands, but i still would need to manually input all of them into the command blocks. Which is why I'm looking for a way to automate this process of entering commands (or even generating the blocks altogether). Thanks!
like you place all those commands in one command block that then creates other blocks from just that command?
or are the command blocks seperated by areas of some kind?
I believe that there are no internal logic for one command generators. All of the command blocks are being run at the same time and all the time which is not I want. I want to generating chains of command blocks where only some commands are executed when certain conditions are met.
Currently I'm writing a MCEdit filter to do this but I have encountered problems with editing the NBT data for the command blocks. The "Command" Tag seems to reset itself every time after I open the world. If you happen to know about MCEdit filters then please help me! Thanks!
To put all the commands into a group of commands blocks, I'd use MCEdit. Just figure out how many commands you have, place that many command blocks into a chain, and use MCEdit to copy and paste the commands. You know how you can use MCEdit to look at all the commands inside a command block? Yeah, do that, then copy and paste the commands into the text document. Make sure that there's 1 empty line between each command, you you have a command, then a blank line, then the next command, then a blank line, and so on. It's not the easiest, but it works.
Or, just use Functions in 1.12. It's about 10 times easier.
To put all the commands into a group of commands blocks, I'd use MCEdit. Just figure out how many commands you have, place that many command blocks into a chain, and use MCEdit to copy and paste the commands. You know how you can use MCEdit to look at all the commands inside a command block? Yeah, do that, then copy and paste the commands into the text document. Make sure that there's 1 empty line between each command, you you have a command, then a blank line, then the next command, then a blank line, and so on. It's not the easiest, but it works.
Or, just use Functions in 1.12. It's about 10 times easier.
Yea, I made a MCEdit filter that actually works right now, the only problem is that the repeating command blocks will not run even when set to always active. I have to manually block update them for them to work, which is tedious.
The thing about functions is that it doesn't take parameters. My command blocks will be running repetitive command but with different values every time.
UPDATE:
I ended up writing a MCEdit filter that will automatically generate command blocks.
Hi,
I'm wondering if there are tools that can help me generate custom command blocks. I'm working on a project that would require lots of nearly identical chains of command blocks with slight differences in the commands.
I'm looking for a way to kind of code this kind of generation, similar to how you can run python scripts in minecraft pi to generate blocks. I want to be able to code a script to place these command blocks into my world, instead of copying and pasting commands all the time.
Thanks!
R3D CRAFT DEFAULT REALISM ADDON
OCD ITEMS
Feel Free To Contact Us
Gmail: [email protected]
Visit Our Website: http://vansiusproductions.weebly.com/
I would suggest writing a Java Generator, or, do what I do, and write the main script out in a notepad with the differences you want labelled (like Tag1, Tag2, etc.) so that later you can use Find and Replace to replace Tag1 with whatever you want. It's weird to explain, so look here:
Example:
---
scoreboard players tag @a add Tag1 {SelectedItem:{id:"minecraft:Tag2"}}
execute @a[tag=Tag1] ~ ~ ~ effect @s Tag3 1 1
---
You could then use Find And Replace in Notepad or Google Docs to replace Tag1 with the tag name, Tag2 with the item, and Tag3 with the effect
My Name Is Bhexion and I make datapacks.
Find me on PlanetMinecraft and Youtube.
You only pointed out how to generate these commands, but i still would need to manually input all of them into the command blocks. Which is why I'm looking for a way to automate this process of entering commands (or even generating the blocks altogether). Thanks!
R3D CRAFT DEFAULT REALISM ADDON
OCD ITEMS
Feel Free To Contact Us
Gmail: [email protected]
Visit Our Website: http://vansiusproductions.weebly.com/
I believe that there are no internal logic for one command generators. All of the command blocks are being run at the same time and all the time which is not I want. I want to generating chains of command blocks where only some commands are executed when certain conditions are met.
Currently I'm writing a MCEdit filter to do this but I have encountered problems with editing the NBT data for the command blocks. The "Command" Tag seems to reset itself every time after I open the world. If you happen to know about MCEdit filters then please help me! Thanks!
R3D CRAFT DEFAULT REALISM ADDON
OCD ITEMS
Feel Free To Contact Us
Gmail: [email protected]
Visit Our Website: http://vansiusproductions.weebly.com/
To put all the commands into a group of commands blocks, I'd use MCEdit. Just figure out how many commands you have, place that many command blocks into a chain, and use MCEdit to copy and paste the commands. You know how you can use MCEdit to look at all the commands inside a command block? Yeah, do that, then copy and paste the commands into the text document. Make sure that there's 1 empty line between each command, you you have a command, then a blank line, then the next command, then a blank line, and so on. It's not the easiest, but it works.
Or, just use Functions in 1.12. It's about 10 times easier.
My Name Is Bhexion and I make datapacks.
Find me on PlanetMinecraft and Youtube.
Yea, I made a MCEdit filter that actually works right now, the only problem is that the repeating command blocks will not run even when set to always active. I have to manually block update them for them to work, which is tedious.
The thing about functions is that it doesn't take parameters. My command blocks will be running repetitive command but with different values every time.
R3D CRAFT DEFAULT REALISM ADDON
OCD ITEMS
Feel Free To Contact Us
Gmail: [email protected]
Visit Our Website: http://vansiusproductions.weebly.com/