[2021.2 EAP 26215] Possible Lossy Conversion from double to int

Started by TechTastic on

Topic category: Feature requests and ideas for MCreator

Last seen on 02:40, 4. Jan 2022
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[2021.2 EAP 26215] Possible Lossy Conversion from double to int

Was about to make a post about making it possible to differentiate between int number variables and double number variables until I realized this error has happened before so I am here to notify you all that this snapshot has the error again

 

I fixed it by manually changing the variable in the code to an int

 

Yes its used in functions related to inventories and inventory slots

Last seen on 00:29, 25. Mar 2022
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In almost all scenarios, a…
Sat, 08/07/2021 - 02:48

In almost all scenarios, a float will be more precise than an int, but it might be worth changing to doubles by default as they can definitely contain all 32-bit integers