Started by
beloiswhite
on
Topic category: Help with Minecraft modding (Java Edition)
Trying to pushing all entities in radius of block. It excellent works for mobs, but not for a player. Using MCreator 2023.3
P.S. I've tried to send messages to player in radius, and it can find a player, but as i said - won't affect on velocity.
Block has 20 ticks, and procedure linked to onUpdate trigger.
I've had the exact same issue. I still don't know why this is the case, but there is a weird workaround. But to be clear, it's a pretty weird workaround.
This doesn't work when called from a block, but for some reason, if an entity calls the same procedure on update tick, it works fine. In short, you can make an invisible, unkillable entity, with a limited lifespan, (Give it a couple seconds of Luck or something when it spawns, then despawn it when it runs out); and then have that entity run a procedure on update tick that does the exact same thing, and it should work. If you want to actually launch stuff away from the block instead of upwards, that's also very much possible, but substantially more complicated/math intensive.
...I would also keep in mind that if you're increasing Y velocity by 0.5 every update tick with no upper threshold, in a 10 block radius, you're really going to launch stuff. Though I assume that's the goal.