override fun g(vec: Vec3D) { if (!isAlive) return if (isOnGround && isFlying) { isFlying = false this.fallDistance = 0.0F } if (!isVehicle) { this.aE = 0.02F super.g(vec) } if (ridingPassenger is EntityLiving) { val rider = this.ridingPassenger as EntityLiving //val forwardDir = rider.bukkitEntity.location.direction this.yaw = rider.yaw this.lastYaw = this.yaw this.pitch = rider.pitch * 0.5F this.setYawPitch(rider.yaw, rider.pitch) this.aA = this.yaw this.aC = this.aA this.aE = this.dN() * 0.1F val speed = 0.5F //The multiplier for movement speed val f = rider.aR * speed.toDouble() // The speed the entity moves side to side. var f1 = rider.aT.toDouble() // The speed the entity moves looking forward if (f1 <= 0) { f1 *= 0.25F } this.q(this.b(GenericAttributes.MOVEMENT_SPEED).toFloat()) return super.g(Vec3D(f, vec.y, f1)) } else if (ridingPassenger is EntityHuman) this.mot = Vec3D.ORIGIN this.a(this, false) }