If your procedure does block operations and they execute on wrong positions, eg. place block procedure places a block off for 1 block, this may be caused by using x, y, and z dependencies directly.
This happens when the procedure trigger source returns a decimal location (eg. entity), but the block expects an integer location. In this case, by default in Java, decimals are stripped away without checking the sign (+ or -). This can result in wrong placement locations.
This can happen in the case of a procedure like this one:
While this procedure will run just fine in case it was triggered by a block trigger that returned integer, it will round incorectly if it is triggered by eg. entity procedure which returns location in a decimal form.
To resolve this problem, there are two solutions, depending on the MCreator version you use.
Solution for versions up to 2020.5
For example above, we can resolve the procedure to operate properly by chaning it to this:
A better solution for versions after (including) 2021.1
For our example, we can resolve the procedure to operate properly by chaning it to this:
Blocks "x ~ block", etc. will return properly rounded location for the current block position in case it is in decimal format.