aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/MobSpawnerTileEntity.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/MobSpawnerTileEntity.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/MobSpawnerTileEntity.cpp')
-rw-r--r--Minecraft.World/MobSpawnerTileEntity.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Minecraft.World/MobSpawnerTileEntity.cpp b/Minecraft.World/MobSpawnerTileEntity.cpp
index e3ee57d6..013503b6 100644
--- a/Minecraft.World/MobSpawnerTileEntity.cpp
+++ b/Minecraft.World/MobSpawnerTileEntity.cpp
@@ -37,7 +37,7 @@ int MobSpawnerTileEntity::TileEntityMobSpawner::getZ()
void MobSpawnerTileEntity::TileEntityMobSpawner::setNextSpawnData(BaseMobSpawner::SpawnData *nextSpawnData)
{
BaseMobSpawner::setNextSpawnData(nextSpawnData);
- if (getLevel() != nullptr) getLevel()->sendTileUpdated(m_parent->x, m_parent->y, m_parent->z);
+ if (getLevel() != NULL) getLevel()->sendTileUpdated(m_parent->x, m_parent->y, m_parent->z);
}
MobSpawnerTileEntity::MobSpawnerTileEntity()
@@ -73,7 +73,7 @@ shared_ptr<Packet> MobSpawnerTileEntity::getUpdatePacket()
CompoundTag *tag = new CompoundTag();
save(tag);
tag->remove(L"SpawnPotentials");
- return std::make_shared<TileEntityDataPacket>(x, y, z, TileEntityDataPacket::TYPE_MOB_SPAWNER, tag);
+ return shared_ptr<TileEntityDataPacket>( new TileEntityDataPacket(x, y, z, TileEntityDataPacket::TYPE_MOB_SPAWNER, tag) );
}
bool MobSpawnerTileEntity::triggerEvent(int b0, int b1)
@@ -90,7 +90,7 @@ BaseMobSpawner *MobSpawnerTileEntity::getSpawner()
// 4J Added
shared_ptr<TileEntity> MobSpawnerTileEntity::clone()
{
- shared_ptr<MobSpawnerTileEntity> result = std::make_shared<MobSpawnerTileEntity>();
+ shared_ptr<MobSpawnerTileEntity> result = shared_ptr<MobSpawnerTileEntity>( new MobSpawnerTileEntity() );
TileEntity::clone(result);
return result;