error: incompatible types: possible lossy conversion from double to int

Started by FieldBoy on

Topic category: Help with MCreator software

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
error: incompatible types: possible lossy conversion from double to int

I created a mod for minecraft using the "Extras" plugin. There is a procedure that accepts an int data type, and in MCreator you can create a variable only with a double data type. How to convert double to int?

This is what the error looks like:

error: incompatible types: possible lossy conversion from double to int

TheRobotsModModVariables.commands.add(((guistate.containsKey("text:code_field") ? ((EditBox) guistate.get("text:code_field")).getValue() : "") + "").split("[" + ";" + "]", -2)[TheRobotsModModVariables.i])

This is a bug of plugin not…
Mon, 07/24/2023 - 10:28

This is a bug of plugin not using system for numbers properly. I would advise reporting the bug to the plugin authors