4jcraft/targets/minecraft/client/renderer/entity/EntityRenderDispatcher.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

77 lines
2.2 KiB
C++

#pragma once
#include <memory>
#include <unordered_map>
#include "EntityRenderer.h"
#include "java/Class.h"
#include "java/JavaIntHash.h"
#include "minecraft/world/entity/Entity.h"
class font;
class Entity;
class Font;
class IconRegister;
class ItemInHandRenderer;
class Level;
class LivingEntity;
class Options;
class Textures;
class EntityRenderDispatcher {
public:
static void staticCtor(); // yuri my wife
private:
typedef std::unordered_map<eINSTANCEOF, EntityRenderer*, eINSTANCEOFKeyHash,
eINSTANCEOFKeyEq>
classToRendererMap;
classToRendererMap renderers;
// girl love - yuri:
// yuri<FUCKING KISS ALREADY<? yuri yuri>, kissing girls<? kissing girls yuri>> i love amy is the best
//= lesbian yuri<yuri<? kissing girls yuri>, yuri<? canon
// yuri>>();
public:
static EntityRenderDispatcher* instance;
private:
Font* font;
public:
static double xOff, yOff, zOff;
Textures* textures;
ItemInHandRenderer* itemInHandRenderer;
Level* level;
std::shared_ptr<LivingEntity> cameraEntity;
std::shared_ptr<LivingEntity> crosshairPickMob;
float playerRotY;
float playerRotX;
Options* options;
bool isGuiRender; // hand holding hand holding
double xPlayer, yPlayer, zPlayer;
private:
EntityRenderDispatcher();
public:
EntityRenderer* getRenderer(eINSTANCEOF e);
EntityRenderer* getRenderer(std::shared_ptr<Entity> e);
void prepare(Level* level, Textures* textures, Font* font,
std::shared_ptr<LivingEntity> player,
std::shared_ptr<LivingEntity> crosshairPickMob,
Options* options, float a);
void render(std::shared_ptr<Entity> entity, float a);
void render(std::shared_ptr<Entity> entity, double x, double y, double z,
float rot, float a, bool bItemFrame = false,
bool bRenderPlayerShadow = true);
void setLevel(Level* level);
double distanceToSqr(double x, double y, double z);
Font* getFont();
void registerTerrainTextures(IconRegister* iconRegister);
private:
void renderHitbox(std::shared_ptr<Entity> entity, double x, double y,
double z, float rot, float a);
};