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 97a4399472.

* 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>
This commit is contained in:
daoge
2026-03-03 03:04:10 +08:00
committed by GitHub
parent 84c31a2331
commit b3feddfef3
2069 changed files with 264842 additions and 139522 deletions

View File

@@ -3,12 +3,15 @@
#include "MultiPlayerLocalPlayer.h"
#include "..\Minecraft.World\net.minecraft.world.entity.animal.h"
ResourceLocation SheepRenderer::SHEEP_LOCATION = ResourceLocation(TN_MOB_SHEEP);
ResourceLocation SheepRenderer::SHEEP_FUR_LOCATION = ResourceLocation(TN_MOB_SHEEP_FUR);
SheepRenderer::SheepRenderer(Model *model, Model *armor, float shadow) : MobRenderer(model, shadow)
{
setArmor(armor);
}
int SheepRenderer::prepareArmor(shared_ptr<Mob> _sheep, int layer, float a)
int SheepRenderer::prepareArmor(shared_ptr<LivingEntity> _sheep, int layer, float a)
{
// 4J - dynamic cast required because we aren't using templates/generics in our version
shared_ptr<Sheep> sheep = dynamic_pointer_cast<Sheep>(_sheep);
@@ -17,8 +20,28 @@ int SheepRenderer::prepareArmor(shared_ptr<Mob> _sheep, int layer, float a)
!sheep->isInvisibleTo(Minecraft::GetInstance()->player)) // 4J-JEV: Todo, merge with java fix (for invisible sheep armour) in '1.7.5'.
{
MemSect(31);
bindTexture(TN_MOB_SHEEP_FUR); // 4J was L"/mob/sheep_fur.png"
bindTexture(&SHEEP_FUR_LOCATION);
MemSect(0);
if (sheep->hasCustomName() && sheep->getCustomName().compare(L"jeb_") == 0)
{
// easter egg...
int colorDuration = 25;
int value = (sheep->tickCount / colorDuration) + sheep->entityId;
int c1 = value % Sheep::COLOR_LENGTH;
int c2 = (value + 1) % Sheep::COLOR_LENGTH;
float subStep = ((sheep->tickCount % colorDuration) + a) / (float) colorDuration;
glColor3f(Sheep::COLOR[c1][0] * (1.0f - subStep) + Sheep::COLOR[c2][0] * subStep, Sheep::COLOR[c1][1] * (1.0f - subStep) + Sheep::COLOR[c2][1] * subStep, Sheep::COLOR[c1][2]
* (1.0f - subStep) + Sheep::COLOR[c2][2] * subStep);
}
else
{
int color = sheep->getColor();
glColor3f(Sheep::COLOR[color][0], Sheep::COLOR[color][1], Sheep::COLOR[color][2]);
}
// 4J - change brought forward from 1.8.2
float brightness = SharedConstants::TEXTURE_LIGHTING ? 1.0f : sheep->getBrightness(a);
int color = sheep->getColor();
@@ -32,3 +55,8 @@ void SheepRenderer::render(shared_ptr<Entity> mob, double x, double y, double z,
{
MobRenderer::render(mob, x, y, z, rot, a);
}
ResourceLocation *SheepRenderer::getTextureLocation(shared_ptr<Entity> mob)
{
return &SHEEP_LOCATION;
}