aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/CauldronTile.cpp
diff options
context:
space:
mode:
authorvoid_17 <heroerror3@gmail.com>2026-03-02 15:58:20 +0700
committervoid_17 <heroerror3@gmail.com>2026-03-02 15:58:20 +0700
commit7074f35e4ba831e358117842b99ee35b87f85ae5 (patch)
tree7d440d23473196af3056bf2ff4c59d9e740a06f5 /Minecraft.World/CauldronTile.cpp
parentd63f79325f85e014361eb8cf1e41eaebedb1ae71 (diff)
shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
Diffstat (limited to 'Minecraft.World/CauldronTile.cpp')
-rw-r--r--Minecraft.World/CauldronTile.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Minecraft.World/CauldronTile.cpp b/Minecraft.World/CauldronTile.cpp
index 4d5640ca..1ff5d9b0 100644
--- a/Minecraft.World/CauldronTile.cpp
+++ b/Minecraft.World/CauldronTile.cpp
@@ -46,7 +46,7 @@ Icon *CauldronTile::getTexture(const wstring &name)
return NULL;
}
-void CauldronTile::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes, shared_ptr<Entity> source)
+void CauldronTile::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes, std::shared_ptr<Entity> source)
{
setShape(0, 0, 0, 1, 5.0f / 16.0f, 1);
Tile::addAABBs(level, x, y, z, box, boxes, source);
@@ -83,7 +83,7 @@ bool CauldronTile::isCubeShaped()
return false;
}
-bool CauldronTile::use(Level *level, int x, int y, int z, shared_ptr<Player> player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly/*=false*/) // 4J added soundOnly param
+bool CauldronTile::use(Level *level, int x, int y, int z, std::shared_ptr<Player> player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly/*=false*/) // 4J added soundOnly param
{
if(soundOnly) return false;
@@ -92,7 +92,7 @@ bool CauldronTile::use(Level *level, int x, int y, int z, shared_ptr<Player> pla
return true;
}
- shared_ptr<ItemInstance> item = player->inventory->getSelected();
+ std::shared_ptr<ItemInstance> item = player->inventory->getSelected();
if (item == NULL)
{
return true;
@@ -106,7 +106,7 @@ bool CauldronTile::use(Level *level, int x, int y, int z, shared_ptr<Player> pla
{
if (!player->abilities.instabuild)
{
- player->inventory->setItem(player->inventory->selected, shared_ptr<ItemInstance>(new ItemInstance(Item::bucket_empty)));
+ player->inventory->setItem(player->inventory->selected, std::shared_ptr<ItemInstance>(new ItemInstance(Item::bucket_empty)));
}
level->setData(x, y, z, 3);
@@ -117,10 +117,10 @@ bool CauldronTile::use(Level *level, int x, int y, int z, shared_ptr<Player> pla
{
if (currentData > 0)
{
- shared_ptr<ItemInstance> potion = shared_ptr<ItemInstance>(new ItemInstance(Item::potion, 1, 0));
+ std::shared_ptr<ItemInstance> potion = std::shared_ptr<ItemInstance>(new ItemInstance(Item::potion, 1, 0));
if (!player->inventory->add(potion))
{
- level->addEntity(shared_ptr<ItemEntity>(new ItemEntity(level, x + 0.5, y + 1.5, z + 0.5, potion)));
+ level->addEntity(std::shared_ptr<ItemEntity>(new ItemEntity(level, x + 0.5, y + 1.5, z + 0.5, potion)));
}
// 4J Stu - Brought forward change to update inventory when filling bottles with water
else if (dynamic_pointer_cast<ServerPlayer>( player ) != NULL)