"Before Entity is Hurt" Trigger Generates Faulty Code

Published by rmsandegs on Tue, 07/21/2020 - 06:38
Upvotes: 2
Issue description

Picture of Procedure Used

Using this trigger in the procedure above results in build errors. According to the console, the 3 lines of code are:

int i = (int) entity.getPosX();
int j = (int) entity.getPosY();
int k = (int) entity.getPosZ();

I'm guessing these are meant to be entity.posX/Y/Z or entity.getPosition().getX/Y/Z(). I would probably suggest using the former because it passes the entity's position with floating-point accuracy.

Imgur link for if the image doesn't load: https://imgur.com/a/G538RYy

Issue comments

Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.