From 7074f35e4ba831e358117842b99ee35b87f85ae5 Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 15:58:20 +0700 Subject: 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. --- Minecraft.World/FarmTile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Minecraft.World/FarmTile.cpp') 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, float fallDistance) +void FarmTile::fallOn(Level *level, int x, int y, int z, std::shared_ptr 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 = dynamic_pointer_cast(entity); + std::shared_ptr player = dynamic_pointer_cast(entity); if(player == NULL || player->isAllowedToMine()) level->setTile(x, y, z, Tile::dirt_Id); } } -- cgit v1.2.3