重写激光炮方法

This commit is contained in:
17146 2024-12-05 21:57:01 +08:00
parent 63a0212d74
commit 6a5f7a0f2a

View file

@ -101,6 +101,15 @@ public class AnnihilatorEntity extends Entity implements GeoEntity, ICannonEntit
} }
} }
// TODO 修改乘客的位置
@Override
protected void positionRider(Entity pPassenger, MoveFunction pCallback) {
if (this.hasPassenger(pPassenger)) {
double d0 = this.getY() + this.getPassengersRidingOffset() + pPassenger.getMyRidingOffset();
pCallback.accept(pPassenger, this.getX(), d0, this.getZ());
}
}
@Override @Override
public boolean canBeCollidedWith() { public boolean canBeCollidedWith() {
return true; return true;