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/BrewingStandTile.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Minecraft.World/BrewingStandTile.cpp') diff --git a/Minecraft.World/BrewingStandTile.cpp b/Minecraft.World/BrewingStandTile.cpp index ec7242c8..1aeb52d8 100644 --- a/Minecraft.World/BrewingStandTile.cpp +++ b/Minecraft.World/BrewingStandTile.cpp @@ -10,7 +10,7 @@ BrewingStandTile::BrewingStandTile(int id) : BaseEntityTile(id, Material::metal, isSolidRender()) { random = new Random(); - iconBase = nullptr; + iconBase = NULL; } BrewingStandTile::~BrewingStandTile() @@ -30,7 +30,7 @@ int BrewingStandTile::getRenderShape() shared_ptr BrewingStandTile::newTileEntity(Level *level) { - return std::make_shared(); + return shared_ptr(new BrewingStandTileEntity()); } bool BrewingStandTile::isCubeShaped() @@ -60,7 +60,7 @@ bool BrewingStandTile::use(Level *level, int x, int y, int z, shared_ptr return true; } shared_ptr brewingStand = dynamic_pointer_cast(level->getTileEntity(x, y, z)); - if (brewingStand != nullptr) player->openBrewingStand(brewingStand); + if (brewingStand != NULL) player->openBrewingStand(brewingStand); return true; } @@ -86,13 +86,13 @@ void BrewingStandTile::animateTick(Level *level, int xt, int yt, int zt, Random void BrewingStandTile::onRemove(Level *level, int x, int y, int z, int id, int data) { shared_ptr tileEntity = level->getTileEntity(x, y, z); - if (tileEntity != nullptr && ( dynamic_pointer_cast(tileEntity) != nullptr) ) + if (tileEntity != NULL && ( dynamic_pointer_cast(tileEntity) != NULL) ) { shared_ptr container = dynamic_pointer_cast(tileEntity); for (int i = 0; i < container->getContainerSize(); i++) { shared_ptr item = container->getItem(i); - if (item != nullptr) + if (item != NULL) { float xo = random->nextFloat() * 0.8f + 0.1f; float yo = random->nextFloat() * 0.8f + 0.1f; @@ -104,14 +104,14 @@ void BrewingStandTile::onRemove(Level *level, int x, int y, int z, int id, int d if (count > item->count) count = item->count; item->count -= count; - shared_ptr itemEntity = std::make_shared(level, x + xo, y + yo, z + zo, shared_ptr(new ItemInstance(item->id, count, item->getAuxValue()))); + shared_ptr itemEntity = shared_ptr(new ItemEntity(level, x + xo, y + yo, z + zo, shared_ptr( new ItemInstance(item->id, count, item->getAuxValue())))); float pow = 0.05f; - itemEntity->xd = static_cast(random->nextGaussian()) * pow; - itemEntity->yd = static_cast(random->nextGaussian()) * pow + 0.2f; - itemEntity->zd = static_cast(random->nextGaussian()) * pow; + itemEntity->xd = (float) random->nextGaussian() * pow; + itemEntity->yd = (float) random->nextGaussian() * pow + 0.2f; + itemEntity->zd = (float) random->nextGaussian() * pow; if (item->hasTag()) { - itemEntity->getItem()->setTag(static_cast(item->getTag()->copy())); + itemEntity->getItem()->setTag((CompoundTag *) item->getTag()->copy()); } level->addEntity(itemEntity); } -- cgit v1.2.3