Posted February 19, 20214 yr I've been working on a projectile type entity but I cant get it to move smoothly without extending some other class that adds logic that interferes with what I'm trying to do or straight up breaks everything. I'm trying to simply get it to stop when hitting a wall and to stick to an entity when hitting it and moving with it. Extending ThrowableEntity makes it break on impact. Extending ArrowEntity forces some methods that are unrelated and causes nullPointerExceptions referring to some data managers. Extending ItemEntity is the closet I've gotten to what I'm trying to do, however continues to slide on the floor. Working around any of these cause it to either stop before hitting the ground, go into blocks, move erratically or rubber-band. I would imagine some sort of ArrowEntity type thing will work best since it has pretty much all of what I need but extending it causes problems and extending AbstractArrowEntity adds methods and sometimes crashes. Seeing this I tried controlling either the motion or position directly but setPosition every tick makes it jitter and rubberband, setMotion doesn't affect anything directly, from what I've seen, and instead has to go through super.tick() (for ProjectileEntity) or move() (which forces it into the ground sometimes). I would appreciate any help especially regarding the correct way to do this, since seemingly every Entity class has a different way of doing it, sometimes using privated fields or methods which are no fun.
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.