Started by
Cleff.
on
Topic category: Help with Minecraft modding (Java Edition)
Hello, I've been playing around with some tools in MCreator and I was wondering if anyone knew how to set a custom variable to the players max health using or not using the attribute command. I'm trying to make a mod that adds Zelda like heart containers. Thank you!
I'm going to rewrite that in an easier way to read because that didn't really make any sense. I want to figure out how to use the attribute command like this:
Basically I would like to know how to add variables into commands like as seen above. Is it even possible or is there a better alternative? Thank you!
You could achieve that by doing this. Here is what the /attribute part says, "/attribute @p generic.max_health base set placeholder"
Thank you! This worked an I'm really excited to see what this mod is like when it's done.
You're welcome, I'm glad I was able to help. I didn't test the procedure in multiplayer and haven't used /execute enough to know for sure, but I would make sure the command works in multiplayer when a player isn't OP and doesn't have permission to use /execute. If it doesn't work, try the other execute procedure block that executes the command at x y z
Got it. Thank you!
Where is 'Local: maxHealth'?
I have found 'Set __ to: __' but there is no 'Local: maxHealth' option.
Creeper you will have to make the variable in the right side you will see Local variables + X
Press plus and name a variable then set the type to number (I think)
What Is The Command??