math.util double float imports?

Started by smmmadden on

Topic category: Advanced modding

Last seen on 03:34, 24. Apr 2024
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
math.util double float imports?

I'm in the process of trying to create a mod to support economy (money in-game) but not finding support for double or float so I can properly format the currency that would be used. Is there any support for importing additional java classes that can be used with MCreator?  It would be Java / Forge and 1.20.1 that I'm interested in currently.

I want to use formats that support USD (.00 and 1.00 and 1,000 or 1,000.00, etc.).  I'll add other currency types eventually but the current number shape [0] doesn't allow decimals or commas in it.

MCreator auto-casts types…
Thu, 04/04/2024 - 17:17

MCreator auto-casts types. If you want to use custom types, you will likely need to manually code the systems you want.

Is there any support for importing additional java classes that can be used with MCreator? 

You can import any library you want using gradle, but there are standard classes in Java available to deal with maths, such as https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html