diff options
| author | daoge <3523206925@qq.com> | 2026-03-03 03:04:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 03:04:10 +0800 |
| commit | b3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch) | |
| tree | 267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.Client/PlayerRenderer.h | |
| parent | 84c31a2331f7a0ec85b9d438992e244f60e5020f (diff) | |
feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a43994725008e35fceb984d5549df9c8cea470.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.Client/PlayerRenderer.h')
| -rw-r--r-- | Minecraft.Client/PlayerRenderer.h | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/Minecraft.Client/PlayerRenderer.h b/Minecraft.Client/PlayerRenderer.h index 10564104..25c32a30 100644 --- a/Minecraft.Client/PlayerRenderer.h +++ b/Minecraft.Client/PlayerRenderer.h @@ -1,11 +1,17 @@ #pragma once #include "MobRenderer.h" #include "..\Minecraft.World\Player.h" + class HumanoidModel; + using namespace std; -class PlayerRenderer : public MobRenderer +class PlayerRenderer : public LivingEntityRenderer { +public: + // 4J: Made public for use in skull renderer + static ResourceLocation DEFAULT_LOCATION; + private: // 4J Added static const unsigned int s_nametagColors[MINECRAFT_NET_MAX_PLAYERS]; @@ -23,20 +29,30 @@ 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); + virtual int prepareArmor(shared_ptr<LivingEntity> _player, int layer, float a); + virtual void prepareSecondPassArmor(shared_ptr<LivingEntity> 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); + virtual void additionalRendering(shared_ptr<LivingEntity> _mob, float a); + void renderNameTags(shared_ptr<LivingEntity> player, double x, double y, double z, wstring msg, float scale, double dist); + + virtual void scale(shared_ptr<LivingEntity> _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); + virtual void setupPosition(shared_ptr<LivingEntity> _mob, double x, double y, double z); + virtual void setupRotations(shared_ptr<LivingEntity> _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 + +public: + virtual ResourceLocation *getTextureLocation(shared_ptr<Entity> entity); + + using LivingEntityRenderer::bindTexture; + virtual void bindTexture(shared_ptr<Entity> entity); // 4J Added override };
\ No newline at end of file |
