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

@@ -5,11 +5,29 @@
#include "ModelPart.h"
#include "..\Minecraft.World\net.minecraft.world.level.tile.entity.h"
#include "..\Minecraft.World\net.minecraft.world.level.tile.h"
#include "..\Minecraft.World\Calendar.h"
ChestRenderer::ChestRenderer()
ResourceLocation ChestRenderer::CHEST_LARGE_TRAP_LOCATION = ResourceLocation(TN_TILE_LARGE_TRAP_CHEST);
//ResourceLocation ChestRenderer::CHEST_LARGE_XMAS_LOCATION = ResourceLocation(TN_TILE_LARGE_XMAS_CHEST);
ResourceLocation ChestRenderer::CHEST_LARGE_LOCATION = ResourceLocation(TN_TILE_LARGE_CHEST);
ResourceLocation ChestRenderer::CHEST_TRAP_LOCATION = ResourceLocation(TN_TILE_TRAP_CHEST);
//ResourceLocation ChestRenderer::CHEST_XMAS_LOCATION = ResourceLocation(TN_TILE_XMAS_CHEST);
ResourceLocation ChestRenderer::CHEST_LOCATION = ResourceLocation(TN_TILE_CHEST);
ChestRenderer::ChestRenderer() : TileEntityRenderer()
{
chestModel = new ChestModel();
largeChestModel = new LargeChestModel();
xmasTextures = false;
// 4J Stu - Disable this
#if 0
if (Calendar::GetMonth() + 1 == 12 && Calendar::GetDayOfMonth() >= 24 && Calendar::GetDayOfMonth() <= 26)
{
xmasTextures = true;
}
#endif
}
ChestRenderer::~ChestRenderer()
@@ -34,7 +52,7 @@ void ChestRenderer::render(shared_ptr<TileEntity> _chest, double x, double y, d
Tile *tile = chest->getTile();
data = chest->getData();
if (tile != NULL && data == 0)
if (dynamic_cast<ChestTile*>(tile) != NULL && data == 0)
{
((ChestTile *) tile)->recalcLockDir(chest->getLevel(), chest->x, chest->y, chest->z);
data = chest->getData();
@@ -49,12 +67,35 @@ void ChestRenderer::render(shared_ptr<TileEntity> _chest, double x, double y, d
if (chest->e.lock() != NULL || chest->s.lock() != NULL)
{
model = largeChestModel;
bindTexture(TN_TILE_LARGE_CHEST); // 4J Was "/item/largechest.png"
if (chest->getType() == ChestTile::TYPE_TRAP)
{
bindTexture(&CHEST_LARGE_TRAP_LOCATION);
}
//else if (xmasTextures)
//{
// bindTexture(&CHEST_LARGE_XMAS_LOCATION);
//}
else
{
bindTexture(&CHEST_LARGE_LOCATION);
}
}
else
{
model = chestModel;
bindTexture(TN_TILE_CHEST); // 4J Was "/item/chest.png"
if (chest->getType() == ChestTile::TYPE_TRAP)
{
bindTexture(&CHEST_TRAP_LOCATION);
}
//else if (xmasTextures)
//{
// bindTexture(&CHEST_XMAS_LOCATION);
//}
else
{
bindTexture(&CHEST_LOCATION);
}
}
glPushMatrix();