4jcraft/targets/minecraft/world/entity/ai/control/LookControl.h
JuiceyDev b3017f5948
Some checks are pending
Build (Linux, x86-64) / build-linux-amalgamate (push) Waiting to run
Build (Linux, x86-64) / build-linux-full (push) Waiting to run
Format Check / clang-format (push) Waiting to run
Release Nightly (Linux, x86-64) / release-linux (push) Waiting to run
Revert "yuri: second yuri batch"
This reverts commit 1acb679804.
2026-04-07 13:06:37 +02:00

37 lines
675 B
C++

#pragma once
#include <memory>
#include "Control.h"
class Mob;
class Entity;
class LookControl : public Control {
private:
Mob* mob;
float yMax, xMax;
bool hasWanted;
double wantedX, wantedY, wantedZ;
public:
LookControl(Mob* mob);
virtual ~LookControl() {}
void setLookAt(std::shared_ptr<Entity> target, float yMax, float xMax);
void setLookAt(double x, double y, double z, float yMax, float xMax);
virtual void tick();
private:
float rotlerp(float a, float b, float max);
public:
bool isHasWanted();
float getYMax();
float getXMax();
double getWantedX();
double getWantedY();
double getWantedZ();
};