Started by
hey23
on
Topic category: Help with Minecraft modding (Java Edition)
I have a mod called "Useless No More" and I have a potion effect called 'Lightness' when it is applied to the player its supposed to launch him further from explosions, but it does not work. For anyone curious the amp value returns correctly but the mx, my and mz values are near 0. And I can't wait 1 tick or something like that since I cannot set local values in the wait block. And that might not even be the solution.
The image does not seem to be loading but this is basically it in text form:
The procedure gets called when "Entity attacked" I forgot to mention this
The only solution I could get to work was temporarily disabling the entity's gravity. Sadly, the way you're using the delta movement data doesn't work since it seems its intended use is for figuring out direction rather than the entity's speed (the numbers are never anything other than 1 or 0). I think the best way to do this is by shooting an arrow with a large knockback, but I can't find a way to make the arrow hit the entity.
This disables and then enables gravity again after a certain amount of time. You could do a check to see if the entity is on the ground after the explosion so it doesn't just disable its gravity for no reason. Tweak the wait time to change the distance. Placeholder name "Lit" for the potion. This certainly isn't the best way to do it, but it's better than nothing.
If you do find a way to make it work with arrows, I'd really like to see the solution