Bug Minecraft components X Y Z improperly typecast to ints in procedures

Started by ionsplitter on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 16:35, 19. Jul 2020
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Bug Minecraft components X Y Z improperly typecast to ints in procedures

I was working on a item that would place a block underneath a player. I use place [gold block] x y-1 z. This works fine as long as you are in the positive x, y, and z region. But when you go negative in any axis it will stop working. The block will no longer be under the player. This is because the values passed are typecast to ints in the java code. The way to fix this is to floor the value before typecasting. This will let it work regardless of where you are. It looks like the dependencies are typecast in the item before being passed to the procedure.

Here is a post where the user had an issue because of it and fixed it without changing java.

https://mcreator.net/forum/53305/how-center-particles

It would be great it all procedures could fix this. So that no java would be neccesary.

The default number type in…
Fri, 06/19/2020 - 09:07

The default number type in all cases will be double starting with 2020.4. It can encapsulate int without loss and still use decimals when needed.

Last seen on 22:41, 29. Dec 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So This will be fixed in…
Fri, 06/19/2020 - 11:55

So This will be fixed in 2020.4?

This is good, because I have lots of procedures that place blocks.