forked from cafeberry/cafeberry
feat(TU20/21): Implement la's TU21 patch file
This adds the following: TU20: 1. Librarians now have a small chance to offer name tags for sale 2. Witches can now spawn at light level 7 or less in any biome or cave 3. Skeletons & Wither Skeletons now rarely spawn anywhere in the Nether TU21: 1. Minecart entity limit increased
This commit is contained in:
@@ -241,7 +241,7 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float
|
||||
|
||||
if (riding)
|
||||
{
|
||||
if(uiBitmaskOverrideAnim&(1<<eAnim_SmallModel) == 0)
|
||||
if ((uiBitmaskOverrideAnim&(1<<eAnim_SmallModel)) == 0)
|
||||
{
|
||||
arm0->xRot += -HALF_PI * 0.4f;
|
||||
arm1->xRot += -HALF_PI * 0.4f;
|
||||
|
||||
@@ -491,7 +491,7 @@ void LivingEntityRenderer::renderNameTag(shared_ptr<LivingEntity> mob, const wst
|
||||
float s = 1 / 60.0f * size;
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef((float) x + 0, (float) y + 2.3f, (float) z);
|
||||
glTranslatef((float) x, (float) y + 2.3f, (float) z);
|
||||
glNormal3f(0, 1, 0);
|
||||
|
||||
glRotatef(-this->entityRenderDispatcher->playerRotY, 0, 1, 0);
|
||||
|
||||
@@ -2934,14 +2934,15 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
|
||||
{
|
||||
*piUse=IDS_TOOLTIPS_UNLEASH;
|
||||
}
|
||||
else if (heldItemId == Item::lead_Id)
|
||||
// 4J: fix improper tooltips for TU20
|
||||
/*else if (heldItemId == Item::lead_Id)
|
||||
{
|
||||
if (!pig->isLeashed()) *piUse=IDS_TOOLTIPS_LEASH;
|
||||
}
|
||||
else if (heldItemId == Item::nameTag_Id)
|
||||
{
|
||||
*piUse = IDS_TOOLTIPS_NAME;
|
||||
}
|
||||
}*/
|
||||
else if (pig->hasSaddle()) // does the pig have a saddle?
|
||||
{
|
||||
*piUse=IDS_TOOLTIPS_MOUNT;
|
||||
|
||||
@@ -445,7 +445,7 @@ void PlayerRenderer::additionalRendering(shared_ptr<LivingEntity> _mob, float a)
|
||||
}
|
||||
}
|
||||
|
||||
void PlayerRenderer::renderNameTags(shared_ptr<LivingEntity> player, double x, double y, double z, wstring msg, float scale, double dist)
|
||||
void PlayerRenderer::renderNameTags(shared_ptr<LivingEntity> player, double x, double y, double z, const wstring &msg, float scale, double dist)
|
||||
{
|
||||
#if 0
|
||||
if (dist < 10 * 10)
|
||||
@@ -471,7 +471,17 @@ void PlayerRenderer::renderNameTags(shared_ptr<LivingEntity> player, double x, d
|
||||
}
|
||||
#endif
|
||||
|
||||
LivingEntityRenderer::renderNameTags(player, x, y, z, msg, scale, dist);
|
||||
shared_ptr<Player> pPlayer = dynamic_pointer_cast<Player>(player);
|
||||
int color = getNametagColour(pPlayer->getPlayerIndex());
|
||||
|
||||
if (player->isSleeping())
|
||||
{
|
||||
renderNameTag(player, msg, x, y - 1.5f, z, 64, color);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderNameTag(player, msg, x, y, z, 64, color);
|
||||
}
|
||||
}
|
||||
|
||||
void PlayerRenderer::scale(shared_ptr<LivingEntity> player, float a)
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
|
||||
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);
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user