aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/StructurePiece.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/StructurePiece.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/StructurePiece.cpp')
-rw-r--r--Minecraft.World/StructurePiece.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Minecraft.World/StructurePiece.cpp b/Minecraft.World/StructurePiece.cpp
index 1d41a608..e4fd3fab 100644
--- a/Minecraft.World/StructurePiece.cpp
+++ b/Minecraft.World/StructurePiece.cpp
@@ -13,7 +13,7 @@
#include "DoorItem.h"
/**
-*
+*
* A structure piece is a construction or room, located somewhere in the world
* with a given orientatino (out of Direction.java). Structure pieces have a
* bounding box that says where the piece is located and its bounds, and the
@@ -89,7 +89,7 @@ StructurePiece* StructurePiece::findCollisionPiece( list< StructurePiece* > *pie
}
// 4J-PB - Added from 1.2.3
-TilePos *StructurePiece::getLocatorPosition()
+TilePos *StructurePiece::getLocatorPosition()
{
return new TilePos(boundingBox->getXCenter(), boundingBox->getYCenter(), boundingBox->getZCenter());
}
@@ -523,7 +523,7 @@ void StructurePiece::placeBlock( Level* level, int block, int data, int x, int y
* The purpose of this method is to wrap the getTile call on Level, in order
* to prevent the level from generating chunks that shouldn't be loaded yet.
* Returns 0 if the call is out of bounds.
-*
+*
* @param level
* @param x
* @param y
@@ -781,7 +781,7 @@ bool StructurePiece::createChest( Level* level, BoundingBox* chunkBB, Random* ra
if ( level->getTile( worldX, worldY, worldZ ) != Tile::chest->id )
{
level->setTile( worldX, worldY, worldZ, Tile::chest->id );
- shared_ptr<ChestTileEntity> chest = dynamic_pointer_cast<ChestTileEntity>(level->getTileEntity( worldX, worldY, worldZ ));
+ std::shared_ptr<ChestTileEntity> chest = dynamic_pointer_cast<ChestTileEntity>(level->getTileEntity( worldX, worldY, worldZ ));
if ( chest != NULL ) WeighedTreasure::addChestItems( random, treasure, chest, numRolls );
return true;
}
@@ -800,7 +800,7 @@ bool StructurePiece::createDispenser(Level *level, BoundingBox *chunkBB, Random
if (level->getTile(worldX, worldY, worldZ) != Tile::dispenser_Id)
{
level->setTileAndData(worldX, worldY, worldZ, Tile::dispenser_Id, getOrientationData(Tile::dispenser_Id, facing));
- shared_ptr<DispenserTileEntity> dispenser = dynamic_pointer_cast<DispenserTileEntity>(level->getTileEntity(worldX, worldY, worldZ));
+ std::shared_ptr<DispenserTileEntity> dispenser = dynamic_pointer_cast<DispenserTileEntity>(level->getTileEntity(worldX, worldY, worldZ));
if (dispenser != NULL) WeighedTreasure::addDispenserItems(random, items, dispenser, numRolls);
return true;
}