Math not being processed correctly

Started by Kuraion on

Topic category: Troubleshooting, bugs, and solutions

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Math not being processed correctly

So for some reason, it seems like the following math block is not being processed correctly

Math Block

In theory, this if block should pass every fifth time (1/(3+2)=0.20) but actually it doesn't pass at all
Am I doing something wrong or is this a bug? 

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nevermind, solved it For…
Mon, 11/01/2021 - 17:35

Nevermind, solved it
For anyone wondering: unless you include a decimal number in there, Java will process these numbers as integers, making 1/5 equal 0 instead of 0.2
So the solution is instead of 3+2 you gotta write 3+1.999

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
2.0 automatically gets…
Mon, 11/01/2021 - 19:05

2.0 automatically gets shortened to 2 in the procedure block, so it doesn't