Posted August 24, 201510 yr I don't think it is normal behavior to be able to stand on top of an entity, right? Plus my custom entity can't be pushed out of the way. Now I thought the canBePushed() method was the one that controlled this. I overrode it to set it to true but still seems to have the same behavior. There is another method called canBeCollidedWith() but I think that also affects attacking and so don't think I should mess with that one, right? I crawled through the vanilla code and most living entities set the canBePushed() to return !this.isDead() so returning true should be fine for my purpose. What am I missing? In my entity I'm controlling the motion tightly, so I suspect that the problem is that when it tries to push me I'm overriding it with motion all 0. How would I let the motion from a push happen -- is there some sort of indication that it has been pushed? If there is no indication that it is in the middle of a push, I guess it must work with a "friction" sort of mechanism. I know that vanilla does that (always multiplies motion by something like 0.93 or something). So I guess maybe I need to implement that? Check out my tutorials here: http://jabelarminecraft.blogspot.com/
August 25, 201510 yr Author Okay, yeah the problem was I was forcing the motion to 0 so any pushing was being canceled. Instead I only set it to 0 at point when entity lands on ground, then afterwards allow it to be pushed with friction effect. SOLVED. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.