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

@@ -1,6 +1,7 @@
#include "stdafx.h"
#include "TheEndPortalFrameTile.h"
#include "net.minecraft.world.level.h"
#include "net.minecraft.world.level.redstone.h"
#include "net.minecraft.world.h"
#include "Facing.h"
@@ -14,15 +15,15 @@ TheEndPortalFrameTile::TheEndPortalFrameTile(int id) : Tile(id, Material::glass,
Icon *TheEndPortalFrameTile::getTexture(int face, int data)
{
if (face == Facing::UP)
if (face == Facing::UP)
{
return iconTop;
}
if (face == Facing::DOWN)
return iconTop;
}
if (face == Facing::DOWN)
{
return Tile::whiteStone->getTexture(face);
}
return icon;
return Tile::endStone->getTexture(face);
}
return icon;
}
void TheEndPortalFrameTile::registerIcons(IconRegister *iconRegister)
@@ -54,16 +55,16 @@ void TheEndPortalFrameTile::updateDefaultShape()
void TheEndPortalFrameTile::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes, shared_ptr<Entity> source)
{
setShape(0, 0, 0, 1, 13.0f / 16.0f, 1);
Tile::addAABBs(level, x, y, z, box, boxes, source);
setShape(0, 0, 0, 1, 13.0f / 16.0f, 1);
Tile::addAABBs(level, x, y, z, box, boxes, source);
int data = level->getData(x, y, z);
if (hasEye(data))
int data = level->getData(x, y, z);
if (hasEye(data))
{
setShape(5.0f / 16.0f, 13.0f / 16.0f, 5.0f / 16.0f, 11.0f / 16.0f, 1, 11.0f / 16.0f);
Tile::addAABBs(level, x, y, z, box, boxes, source);
}
updateDefaultShape();
setShape(5.0f / 16.0f, 13.0f / 16.0f, 5.0f / 16.0f, 11.0f / 16.0f, 1, 11.0f / 16.0f);
Tile::addAABBs(level, x, y, z, box, boxes, source);
}
updateDefaultShape();
}
bool TheEndPortalFrameTile::hasEye(int data)
@@ -76,8 +77,27 @@ int TheEndPortalFrameTile::getResource(int data, Random *random, int playerBonus
return 0;
}
void TheEndPortalFrameTile::setPlacedBy(Level *level, int x, int y, int z, shared_ptr<Mob> by)
void TheEndPortalFrameTile::setPlacedBy(Level *level, int x, int y, int z, shared_ptr<LivingEntity> by, shared_ptr<ItemInstance> itemInstance)
{
int dir = (((Mth::floor(by->yRot * 4 / (360) + 0.5)) & 3) + 2) % 4;
level->setData(x, y, z, dir);
int dir = (((Mth::floor(by->yRot * 4 / (360) + 0.5)) & 3) + 2) % 4;
level->setData(x, y, z, dir, Tile::UPDATE_CLIENTS);
}
bool TheEndPortalFrameTile::hasAnalogOutputSignal()
{
return true;
}
int TheEndPortalFrameTile::getAnalogOutputSignal(Level *level, int x, int y, int z, int dir)
{
int data = level->getData(x, y, z);
if (hasEye(data))
{
return Redstone::SIGNAL_MAX;
}
else
{
return Redstone::SIGNAL_NONE;
}
}