diff options
| author | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
| commit | b691c43c44ff180d10e7d4a9afc83b98551ff586 (patch) | |
| tree | 3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.Client/PlayerRenderer.h | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.Client/PlayerRenderer.h')
| -rw-r--r-- | Minecraft.Client/PlayerRenderer.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Minecraft.Client/PlayerRenderer.h b/Minecraft.Client/PlayerRenderer.h new file mode 100644 index 00000000..10564104 --- /dev/null +++ b/Minecraft.Client/PlayerRenderer.h @@ -0,0 +1,42 @@ +#pragma once +#include "MobRenderer.h" +#include "..\Minecraft.World\Player.h" +class HumanoidModel; +using namespace std; + +class PlayerRenderer : public MobRenderer +{ +private: + // 4J Added + static const unsigned int s_nametagColors[MINECRAFT_NET_MAX_PLAYERS]; + + HumanoidModel *humanoidModel; + HumanoidModel *armorParts1; + HumanoidModel *armorParts2; + +public: + PlayerRenderer(); + + static unsigned int getNametagColour(int index); + +private: + static const wstring MATERIAL_NAMES[5]; + +protected: + virtual int prepareArmor(shared_ptr<Mob> _player, int layer, float a); + virtual void prepareSecondPassArmor(shared_ptr<Mob> mob, int layer, float a); +public: + virtual void render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a); +protected: + virtual void renderName(shared_ptr<Mob> _mob, double x, double y, double z); + virtual void additionalRendering(shared_ptr<Mob> _mob, float a); + virtual void scale(shared_ptr<Mob> _player, float a); +public: + void renderHand(); +protected: + virtual void setupPosition(shared_ptr<Mob> _mob, double x, double y, double z); + virtual void setupRotations(shared_ptr<Mob> _mob, float bob, float bodyRot, float a); + +private: + virtual void renderShadow(shared_ptr<Entity> e, double x, double y, double z, float pow, float a); // 4J Added override +};
\ No newline at end of file |
