aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/CommandBlock.cpp
diff options
context:
space:
mode:
authorLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
committerLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
commit087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch)
tree69454763e73ca764af4e682d3573080b13138a0e /Minecraft.World/CommandBlock.cpp
parenta9be52c41a02d207233199e98898fe7483d7e817 (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/CommandBlock.cpp')
-rw-r--r--Minecraft.World/CommandBlock.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Minecraft.World/CommandBlock.cpp b/Minecraft.World/CommandBlock.cpp
index c151172e..e1b6b8dd 100644
--- a/Minecraft.World/CommandBlock.cpp
+++ b/Minecraft.World/CommandBlock.cpp
@@ -10,7 +10,7 @@ CommandBlock::CommandBlock(int id) : BaseEntityTile(id, Material::metal, isSolid
shared_ptr<TileEntity> CommandBlock::newTileEntity(Level *level)
{
- return std::make_shared<CommandBlockEntity>();
+ return shared_ptr<CommandBlockEntity>( new CommandBlockEntity() );
}
void CommandBlock::neighborChanged(Level *level, int x, int y, int z, int type)
@@ -38,7 +38,7 @@ void CommandBlock::tick(Level *level, int x, int y, int z, Random *random)
{
shared_ptr<TileEntity> tileEntity = level->getTileEntity(x, y, z);
- if (tileEntity != nullptr && dynamic_pointer_cast<CommandBlockEntity>( tileEntity ) != nullptr)
+ if (tileEntity != NULL && dynamic_pointer_cast<CommandBlockEntity>( tileEntity ) != NULL)
{
shared_ptr<CommandBlockEntity> commandBlock = dynamic_pointer_cast<CommandBlockEntity>( tileEntity );
commandBlock->setSuccessCount(commandBlock->performCommand(level));
@@ -55,7 +55,7 @@ bool CommandBlock::use(Level *level, int x, int y, int z, shared_ptr<Player> pla
{
shared_ptr<CommandBlockEntity> amce = dynamic_pointer_cast<CommandBlockEntity>( level->getTileEntity(x, y, z) );
- if (amce != nullptr)
+ if (amce != NULL)
{
player->openTextEdit(amce);
}
@@ -72,7 +72,7 @@ int CommandBlock::getAnalogOutputSignal(Level *level, int x, int y, int z, int d
{
shared_ptr<TileEntity> tileEntity = level->getTileEntity(x, y, z);
- if (tileEntity != nullptr && dynamic_pointer_cast<CommandBlockEntity>( tileEntity ) != nullptr)
+ if (tileEntity != NULL && dynamic_pointer_cast<CommandBlockEntity>( tileEntity ) != NULL)
{
return dynamic_pointer_cast<CommandBlockEntity>( tileEntity )->getSuccessCount();
}