mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-06-20 11:13:02 +00:00
Renamed all Alex skins and Developer Steve skin to match the official file names, reordered default skin to match the order in the official release of LCE, modified model type logic to be more optimized, added more anim flags to HumanoidModel.h, added code to show armor if the corresponding part is hidden but the "show armor" part anim flag is present, added code to handle extra skin box values of "hide with armor", "mirror skin box", and "scale", corrected player model second/overlay layer scale from 0.5 to 0.25, and fixed skin boxes not rendering on 64x64 DLC skins.
68 lines
2 KiB
C++
68 lines
2 KiB
C++
#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 *humanoidModelWide;
|
|
HumanoidModel *humanoidModelSlim;
|
|
HumanoidModel *resModel;
|
|
|
|
HumanoidModel *armorParts1;
|
|
HumanoidModel *armorParts2;
|
|
HumanoidModel *armorParts3;
|
|
HumanoidModel *armorParts4;
|
|
bool defaultSlimHands;
|
|
|
|
static ResourceLocation SKELETON_LOCATION;
|
|
static ResourceLocation WITHER_SKELETON_LOCATION;
|
|
static ResourceLocation ZOMBIE_LOCATION;
|
|
static ResourceLocation CREEPER_LOCATION;
|
|
|
|
public:
|
|
PlayerRenderer();
|
|
|
|
static unsigned int getNametagColour(int index);
|
|
|
|
private:
|
|
static const wstring MATERIAL_NAMES[5];
|
|
|
|
protected:
|
|
virtual void setModelType(shared_ptr<Player> player);
|
|
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, const 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
|
|
}; |