Started by
supermj767
on
Topic category: Troubleshooting, bugs, and solutions
I need some help with this procedure
This procedure is an additional generation for my geodes that's suppose to check if the game rule is true and does not work.
I either did something wrong or the procedure does not work, its not spawning any amethyst geodes in my mod even if the custom game rule is true.
can anyone help????
Edited by supermj767 on Sun, 01/24/2021 - 04:25
I'm trying to use my custom Gamerule and its not working
Consider printing the value of the game rule before returning the value, to check what value you get.
It could be that one can't access the game rules in the world generating context.
Which procedure blocks would I use to achieve this?
"Print" from "Text" and look in console for data
Its spamming the console telling me its set to false, even when it isn't suppose to be.
I think since the "return" block and the "get logic game rule" block are both Logic, they are conflicting with each other, so what its actually doing is setting the game rule false every time I set it to true.
Are they're any fixes for this?
Are they're any fixes for this?
Yes! You are setting it to false even if it is true, because you set it to return false whether or not it already returned true. Do if else and put return false in the else instead of putting it on the end. Hope this helps!
The return block has to be at the end of the procedure for the additional generation to actually work, but in doing so, its changing my game rule to false, which isn't supposed to happen. this solution will not work. thanks anyway though.
anyone else have any solutions?
Fixed, thanks though.
I'm a bit late but you should always return a local variable.
If gamerule = true{
set variable to true
else {
set variable to false
return variable.