From b3feddfef372618c8a9d7a0abcaf18cfad866c18 Mon Sep 17 00:00:00 2001 From: daoge <3523206925@qq.com> Date: Tue, 3 Mar 2026 03:04:10 +0800 Subject: 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 97a43994725008e35fceb984d5549df9c8cea470. * 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 --- Minecraft.World/TheEndPortal.cpp | 55 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 27 deletions(-) (limited to 'Minecraft.World/TheEndPortal.cpp') diff --git a/Minecraft.World/TheEndPortal.cpp b/Minecraft.World/TheEndPortal.cpp index 19d95b1f..f2cb5dad 100644 --- a/Minecraft.World/TheEndPortal.cpp +++ b/Minecraft.World/TheEndPortal.cpp @@ -21,9 +21,9 @@ void TheEndPortal::allowAnywhere(bool set) TlsSetValue(tlsIdx,(LPVOID)(set?1:0)); } -TheEndPortal::TheEndPortal(int id, Material *material) : EntityTile(id, material, isSolidRender()) +TheEndPortal::TheEndPortal(int id, Material *material) : BaseEntityTile(id, material, isSolidRender()) { - this->setLightEmission(1.0f); + this->setLightEmission(1.0f); } shared_ptr TheEndPortal::newTileEntity(Level *level) @@ -33,14 +33,14 @@ shared_ptr TheEndPortal::newTileEntity(Level *level) void TheEndPortal::updateShape(LevelSource *level, int x, int y, int z, int forceData, shared_ptr forceEntity) // 4J added forceData, forceEntity param { - float r = 1 / 16.0f; - this->setShape(0, 0, 0, 1, r, 1); + float r = 1 / 16.0f; + setShape(0, 0, 0, 1, r, 1); } bool TheEndPortal::shouldRenderFace(LevelSource *level, int x, int y, int z, int face) { - if (face != 0) return false; - return EntityTile::shouldRenderFace(level, x, y, z, face); + if (face != 0) return false; + return BaseEntityTile::shouldRenderFace(level, x, y, z, face); } void TheEndPortal::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes, shared_ptr source) @@ -64,11 +64,13 @@ int TheEndPortal::getResourceCount(Random *random) void TheEndPortal::entityInside(Level *level, int x, int y, int z, shared_ptr entity) { - if (entity->riding == NULL && entity->rider.lock() == NULL) + if (entity->GetType() == eTYPE_EXPERIENCEORB ) return; // 4J added + + if (entity->riding == NULL && entity->rider.lock() == NULL) { - if (dynamic_pointer_cast(entity) != NULL) + if (!level->isClientSide) { - if (!level->isClientSide) + if ( entity->instanceof(eTYPE_PLAYER) ) { // 4J Stu - Update the level data position so that the stronghold portal can be shown on the maps int x,z; @@ -79,39 +81,38 @@ void TheEndPortal::entityInside(Level *level, int x, int y, int z, shared_ptrgetLevelData()->setZStrongholdEndPortal(z); level->getLevelData()->setHasStrongholdEndPortal(); } - - (dynamic_pointer_cast(entity))->changeDimension(1); - } - } - } + } + entity->changeDimension(1); + } + } } void TheEndPortal::animateTick(Level *level, int xt, int yt, int zt, Random *random) { - double x = xt + random->nextFloat(); - double y = yt + 0.8f; - double z = zt + random->nextFloat(); - double xa = 0; - double ya = 0; - double za = 0; + double x = xt + random->nextFloat(); + double y = yt + 0.8f; + double z = zt + random->nextFloat(); + double xa = 0; + double ya = 0; + double za = 0; - level->addParticle(eParticleType_endportal, x, y, z, xa, ya, za); + level->addParticle(eParticleType_endportal, x, y, z, xa, ya, za); } int TheEndPortal::getRenderShape() { - return SHAPE_INVISIBLE; + return SHAPE_INVISIBLE; } void TheEndPortal::onPlace(Level *level, int x, int y, int z) { - if (allowAnywhere()) return; + if (allowAnywhere()) return; - if (level->dimension->id != 0) + if (level->dimension->id != 0) { - level->setTile(x, y, z, 0); - return; - } + level->removeTile(x, y, z); + return; + } } int TheEndPortal::cloneTileId(Level *level, int x, int y, int z) -- cgit v1.2.3