Started by
EnVx_iAngel
on
Topic category: Help with Minecraft modding (Java Edition)
I'm trying to make it so when a checkbox is checked it adds water to a block. The checkbox resets whenever I close the GUI. And I can't get it to add the water when it's checked.
There is an option in the checkbox itself that says you need x,y,z,world,entity. to be able to add a procedure. I had a tough time getting entity in a block with no slots. but after I got all the dependencies. It still wouldn't let me add the procedure to it.
I'm stumped idk what to do to get this to work. The resetting of the checkbox is gonna be a huge problem even if I get it to add water to the block.
Anybody know how the checkbox works?
please and thank you :)
Edited by EnVx_iAngel on Fri, 09/10/2021 - 02:03
I honestly don't know what you mean, though I think this is correct? or you want the water to spawn in top of the block
No i want the internal tanks to fill with water. Like 1000 every tick if the checkbox is checked. If its checked it starts filling and when its not it stops. I wanted to make a sink like block that can be turned off from the GUI checkbox.
Also is there no way to keep the state of the checkbox after closing? I always have issues with the labels only updating after i reopen the GUI. Can't seem to figure out how to update it while its open.
You can have a variable that's true or false. And each time you tick the box, it sets the variable to true. When you untick, it sets the variable to false. Each 1000 ticks, it checks that variable and puts in water if it's true. I don't know how to save the tickbox though.
Maybe I should do a world variable or a local variable for the checkbox logic? Couldn't see a way to set the checkbox though, so idk how you would do that.