aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/PlayerRenderer.h
blob: 494ff795f0e41a4dbd7935a6585177f726b6e7da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once
#include "MobRenderer.h"
#include "..\Minecraft.World\Player.h"

class HumanoidModel;

using namespace std;

class PlayerRenderer : public LivingEntityRenderer
{
public:
	// 4J: Made public for use in skull renderer
	static ResourceLocation DEFAULT_LOCATION;

private:
	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<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 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<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
};