From 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a Mon Sep 17 00:00:00 2001 From: Loki Rautio Date: Sat, 7 Mar 2026 21:12:22 -0600 Subject: Revert "Project modernization (#630)" This code was not tested and breaks in Release builds, reverting to restore functionality of the nightly. All in-game menus do not work and generating a world crashes. This reverts commit a9be52c41a02d207233199e98898fe7483d7e817. --- Minecraft.World/LeashFenceKnotEntity.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Minecraft.World/LeashFenceKnotEntity.cpp') diff --git a/Minecraft.World/LeashFenceKnotEntity.cpp b/Minecraft.World/LeashFenceKnotEntity.cpp index f94bcba7..55947d04 100644 --- a/Minecraft.World/LeashFenceKnotEntity.cpp +++ b/Minecraft.World/LeashFenceKnotEntity.cpp @@ -70,14 +70,14 @@ bool LeashFenceKnotEntity::interact(shared_ptr player) shared_ptr item = player->getCarriedItem(); bool attachedMob = false; - if (item != nullptr && item->id == Item::lead_Id) + if (item != NULL && item->id == Item::lead_Id) { if (!level->isClientSide) { // look for entities that can be attached to the fence double range = 7; vector > *mobs = level->getEntitiesOfClass(typeid(Mob), AABB::newTemp(x - range, y - range, z - range, x + range, y + range, z + range)); - if (mobs != nullptr) + if (mobs != NULL) { for(auto& it : *mobs) { @@ -101,7 +101,7 @@ bool LeashFenceKnotEntity::interact(shared_ptr player) // if the player is in creative mode, attempt to remove all leashed mobs without dropping additional items double range = 7; vector > *mobs = level->getEntitiesOfClass(typeid(Mob), AABB::newTemp(x - range, y - range, z - range, x + range, y + range, z + range)); - if (mobs != nullptr) + if (mobs != NULL) { for(auto& it : *mobs) { @@ -122,7 +122,7 @@ bool LeashFenceKnotEntity::survives() { // knots are placed on top of fence tiles int tile = level->getTile(xTile, yTile, zTile); - if (Tile::tiles[tile] != nullptr && Tile::tiles[tile]->getRenderShape() == Tile::SHAPE_FENCE) + if (Tile::tiles[tile] != NULL && Tile::tiles[tile]->getRenderShape() == Tile::SHAPE_FENCE) { return true; } @@ -131,7 +131,7 @@ bool LeashFenceKnotEntity::survives() shared_ptr LeashFenceKnotEntity::createAndAddKnot(Level *level, int x, int y, int z) { - shared_ptr knot = std::make_shared(level, x, y, z); + shared_ptr knot = shared_ptr( new LeashFenceKnotEntity(level, x, y, z) ); knot->forcedLoading = true; level->addEntity(knot); return knot; @@ -140,7 +140,7 @@ shared_ptr LeashFenceKnotEntity::createAndAddKnot(Level *l shared_ptr LeashFenceKnotEntity::findKnotAt(Level *level, int x, int y, int z) { vector > *knots = level->getEntitiesOfClass(typeid(LeashFenceKnotEntity), AABB::newTemp(x - 1.0, y - 1.0, z - 1.0, x + 1.0, y + 1.0, z + 1.0)); - if (knots != nullptr) + if (knots != NULL) { for (auto& it : *knots ) { -- cgit v1.2.3