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 a9be52c41a.
This commit is contained in:
Loki Rautio
2026-03-07 21:12:22 -06:00
parent a9be52c41a
commit 087b7e7abf
1373 changed files with 19449 additions and 19903 deletions

View File

@@ -27,14 +27,14 @@ DispenseItemBehavior *DropperTile::getDispenseMethod(shared_ptr<ItemInstance> it
shared_ptr<TileEntity> DropperTile::newTileEntity(Level *level)
{
return std::make_shared<DropperTileEntity>();
return shared_ptr<DropperTileEntity>( new DropperTileEntity() );
}
void DropperTile::dispenseFrom(Level *level, int x, int y, int z)
{
BlockSourceImpl source(level, x, y, z);
shared_ptr<DispenserTileEntity> trap = dynamic_pointer_cast<DispenserTileEntity>( source.getEntity() );
if (trap == nullptr) return;
if (trap == NULL) return;
int slot = trap->getRandomSlot();
if (slot < 0)
@@ -48,11 +48,11 @@ void DropperTile::dispenseFrom(Level *level, int x, int y, int z)
shared_ptr<Container> into = HopperTileEntity::getContainerAt(level, x + Facing::STEP_X[face], y + Facing::STEP_Y[face], z + Facing::STEP_Z[face]);
shared_ptr<ItemInstance> remaining = nullptr;
if (into != nullptr)
if (into != NULL)
{
remaining = HopperTileEntity::addItem(into.get(), item->copy()->remove(1), Facing::OPPOSITE_FACING[face]);
if (remaining == nullptr)
if (remaining == NULL)
{
remaining = item->copy();
if (--remaining->count == 0) remaining = nullptr;
@@ -66,7 +66,7 @@ void DropperTile::dispenseFrom(Level *level, int x, int y, int z)
else
{
remaining = DISPENSE_BEHAVIOUR->dispense(&source, item);
if (remaining != nullptr && remaining->count == 0) remaining = nullptr;
if (remaining != NULL && remaining->count == 0) remaining = nullptr;
}
trap->setItem(slot, remaining);