Started by
Peeblo
on
Topic category: Help with Minecraft modding (Java Edition)
I have the following global trigger
I'm trying to make an entity that attacks by flinging other entities up, including the player, but no matter what, the entity that gets hurt does not get flung upwards UNLESS they are jumping or mid-air (it's not fully clear to me which one, just not on the ground).
Any help? I've tried many things like setting the entity's position one block higher before overriding the motion vector, which does reposition them but it still doesn't fling.
Edited by Peeblo on Fri, 10/03/2025 - 15:53
this is probably because the knockback of the attack overrides it, try cancelling the trigger,
or maybe setting the damage to 0
Neither of these work, setting the parameter to 0 does cancel the damage but it still has the knockback (it pushes the entity when they jump too), and cancelling the event makes it so nothing happens when the entity attacks.
try using this block instead
Alongside cancelling the trigger or setting the trigger parameter to 0?
none of those, just your original procedure but instead of the attempt block use the push block.
Same thing happens, only flings when you're mid-air or jumping not on the ground
um okay so it seems the client just overrides the motion change. So it has to be run both client and server side..
It works, thank you! Though I'd like this to work for all types of entities not just players.
oh then you can just use the entity tick update instead of the player one. The global variable should work even though it says player in the variable tab.
If it doesn't tell me
It only works on entities when I do that, but I just duplicated the event and made it happen on player tick updates as well