diff options
| author | Loki Rautio <lokirautio@gmail.com> | 2026-03-07 21:12:22 -0600 |
|---|---|---|
| committer | Loki Rautio <lokirautio@gmail.com> | 2026-03-07 21:12:22 -0600 |
| commit | 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch) | |
| tree | 69454763e73ca764af4e682d3573080b13138a0e /Minecraft.World/DropperTile.cpp | |
| parent | a9be52c41a02d207233199e98898fe7483d7e817 (diff) | |
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.
Diffstat (limited to 'Minecraft.World/DropperTile.cpp')
| -rw-r--r-- | Minecraft.World/DropperTile.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Minecraft.World/DropperTile.cpp b/Minecraft.World/DropperTile.cpp index 180aec2a..a28228c9 100644 --- a/Minecraft.World/DropperTile.cpp +++ b/Minecraft.World/DropperTile.cpp @@ -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); |
