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

Started by TechTastic on Mon, 07/05/2021 - 15:27

Topic category: Feature requests and ideas for MCreator

Last seen on 02:01, 27. Aug 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
[2021.2 EAP 26215] Possible Lossy Conversion from double to int
Mon, 07/05/2021 - 15:27

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 03:48, 8. Aug 2021
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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