6#include <condition_variable>
11#include <unordered_set>
22 class InventoryManager;
32 class BehaviourRenderer;
55 std::shared_ptr<World> world_,
56 std::shared_ptr<InventoryManager> inventory_manager_,
57 std::shared_ptr<EntityManager> entity_manager_
65 RenderingManager(std::shared_ptr<World> world_, std::shared_ptr<InventoryManager> inventory_manager_,
66 std::shared_ptr<EntityManager> entity_manager_,
67 const unsigned int section_height_ = 16
86 void SetPosOrientation(
const double x_,
const double y_,
const double z_,
const float yaw_,
const float pitch_);
108#if PROTOCOL_VERSION < 757
109 virtual void Handle(ProtocolCraft::ClientboundLevelChunkPacket& msg)
override;
116#if PROTOCOL_VERSION < 759
117 virtual void Handle(ProtocolCraft::ClientboundAddMobPacket& msg)
override;
119#if PROTOCOL_VERSION < 721
120 virtual void Handle(ProtocolCraft::ClientboundAddGlobalEntityPacket& msg)
override;
122#if PROTOCOL_VERSION < 764
123 virtual void Handle(ProtocolCraft::ClientboundAddPlayerPacket& msg)
override;
126#if PROTOCOL_VERSION < 755
127 virtual void Handle(ProtocolCraft::ClientboundMoveEntityPacket& msg)
override;
133#if PROTOCOL_VERSION == 755
134 virtual void Handle(ProtocolCraft::ClientboundRemoveEntityPacket& msg)
override;
void BehaviourTickChild(const size_t i) const
void ResetBehaviourState() const
std::thread thread_updating_renderable
static std::shared_ptr< RenderingManager > CreateRenderingManagerIfPossible(std::shared_ptr< World > world_, std::shared_ptr< InventoryManager > inventory_manager_, std::shared_ptr< EntityManager > entity_manager_)
std::unordered_set< int > entities_to_update
void WaitForRenderingUpdate()
void BehaviourStartTick() const
std::unique_ptr< BehaviourRenderer > behaviour_renderer
void InternalProcessInput(GLFWwindow *window)
void SetKeyboardCallback(std::function< void(std::array< bool, static_cast< int >(KEY_CODE::NUMBER_OF_KEYS)>, double)> callback)
void ResetBlackboard() const
std::function< void(double, double)> MouseCallback
static std::mutex instance_mutex
std::condition_variable condition_update
std::shared_ptr< LocalPlayer > local_player
bool current_window_headless
void AddChunkToUpdate(const int x, const int z)
std::shared_ptr< World > world
void SetCurrentBehaviourTree(const BaseNode *root) const
static void ResizeCallback(GLFWwindow *window, int width, int height)
std::unique_ptr< WorldRenderer > world_renderer
std::unordered_set< Position > chunks_to_udpate
std::shared_ptr< EntityManager > entity_manager
void RemoveBlackboardValue(const std::string &key) const
static void InternalMouseCallback(GLFWwindow *window, double xpos, double ypos)
void UpdateBlackboardValue(const std::string &key, const std::any &value) const
void SetMouseCallback(std::function< void(double, double)> callback)
int current_window_height
void BehaviourEndTick(const bool b) const
std::unique_ptr< Shader > my_shader
virtual void Handle(ProtocolCraft::ClientboundBlockUpdatePacket &msg) override
std::mutex mutex_updating
std::function< void(std::array< bool, static_cast< int >(KEY_CODE::NUMBER_OF_KEYS)>, double)> KeyboardCallback
std::thread rendering_thread
std::shared_ptr< InventoryManager > inventory_manager
bool IsBehaviourGUIPaused() const
static std::weak_ptr< RenderingManager > current_instance
std::array< bool, static_cast< int >(KEY_CODE::NUMBER_OF_KEYS)> is_key_pressed
void AddEntityToUpdate(const int id)
void SetPosOrientation(const double x_, const double y_, const double z_, const float yaw_, const float pitch_)