aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/FarmTile.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/FarmTile.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/FarmTile.cpp')
-rw-r--r--Minecraft.World/FarmTile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Minecraft.World/FarmTile.cpp b/Minecraft.World/FarmTile.cpp
index ecfaf44b..72d428bb 100644
--- a/Minecraft.World/FarmTile.cpp
+++ b/Minecraft.World/FarmTile.cpp
@@ -74,14 +74,14 @@ void FarmTile::tick(Level *level, int x, int y, int z, Random *random)
}
}
-void FarmTile::fallOn(Level *level, int x, int y, int z, shared_ptr<Entity> entity, float fallDistance)
+void FarmTile::fallOn(Level *level, int x, int y, int z, std::shared_ptr<Entity> entity, float fallDistance)
{
// 4J Stu - Fix for #86148 - Code: Gameplay: Jumping on Farmland does not always result in turning to Dirt Block
// We should not be setting tiles on the client based on random values!
if (!level->isClientSide && level->random->nextFloat() < (fallDistance - .5f))
{
// Fix for #60547 - TU7: Content: Gameplay: Players joining a game can destroy crops even with Trust Players option disabled.
- shared_ptr<Player> player = dynamic_pointer_cast<Player>(entity);
+ std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(entity);
if(player == NULL || player->isAllowedToMine()) level->setTile(x, y, z, Tile::dirt_Id);
}
}