Started by
Rotmax
on
Topic category: Help with Minecraft modding (Java Edition)
I want to make an entity which can't move. So i deleted the Mob Ai (Walking) and i figured out that an entity doesn't get knockback if you hit it.
The problem is that if you are close to the hitbox of the mob, you push it away. How can i disable to push it away?
Maybe you can just make the hitbox EXTREMELY small so there's just a low chance of the player moving it? Maybe if you set it to 0 you can remove it outright.
But i want to make the mod hitable...
Well there is one more way to do this without coding but it's not foolproof or recommended: You could use commands within procedures to put the mob of choice on a /scoreboard team that has collisionRule disabled, then put the player on that same team.
Like I said, it's full of holes but I'm not much of a coder without looking for hours online, which you could do yourself.
Thank you, i will try it👍👍
On initial entity spawn:
save the x, y and z position in three NBT tags.
On entity tick update:
make entity move to that position.