CC: setBurnRate causing obscure error when value is greater than maxBurnRate
saismeesaimonsaimes opened this issue ยท 3 comments
Issue description
The setBurnRate function gives an obscure error "d != java.lang.Double" when providing a number greater than the maxBurnRate possible with the current amount of fuel rods.
Steps to reproduce
Wrap the reactor as a peripheral
Run reactor.setBurnRate()
and provide a number greater than the max (ex: reactor.setBurnRate(reactor.getMaxBurnRate() + 1)
)
See obscure error, rather than something more sensible
Minecraft version
1.19.2 (Latest)
Forge version
43.2.3
Mekanism version
10.3.5
Other relevant versions
No response
If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)
No response
I will try and look at this a little but I am not sure it will be something I can fix as we already have a better error message, so unless something is failing only slightly higher up the chain where we wrap various types... I think it might be failing in CC land before even being passed to us.
Also don't getters usually require parenthesis? Or is that not the case in CC/lua. Aka shouldn't it maybe be reactor.setBurnRate(reactor.getMaxBurnRate() + 1)
Also don't getters usually require parenthesis? Or is that not the case in CC/lua. Aka shouldn't it maybe be
reactor.setBurnRate(reactor.getMaxBurnRate() + 1)
Yeah, sorry, just made a typo in my issue.