aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/PistonMovingPiece.cpp
diff options
context:
space:
mode:
authorvoid_17 <heroerror3@gmail.com>2026-03-02 17:37:16 +0700
committervoid_17 <heroerror3@gmail.com>2026-03-02 17:37:16 +0700
commit119bff351450ea16ffda550b6e0f67379b29f708 (patch)
treed9f28714afd516bc2450f33b0a77c5e05ff4de90 /Minecraft.World/PistonMovingPiece.cpp
parent8a2a62ea1d47364f802cf9aae97668bc4a7007b5 (diff)
Revert "shared_ptr -> std::shared_ptr"
This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5.
Diffstat (limited to 'Minecraft.World/PistonMovingPiece.cpp')
-rw-r--r--Minecraft.World/PistonMovingPiece.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/Minecraft.World/PistonMovingPiece.cpp b/Minecraft.World/PistonMovingPiece.cpp
index a9d661ee..e141cebe 100644
--- a/Minecraft.World/PistonMovingPiece.cpp
+++ b/Minecraft.World/PistonMovingPiece.cpp
@@ -11,7 +11,7 @@ PistonMovingPiece::PistonMovingPiece(int id) : EntityTile(id, Material::piston,
setDestroyTime(INDESTRUCTIBLE_DESTROY_TIME);
}
-std::shared_ptr<TileEntity> PistonMovingPiece::newTileEntity(Level *level)
+shared_ptr<TileEntity> PistonMovingPiece::newTileEntity(Level *level)
{
return nullptr;
}
@@ -22,7 +22,7 @@ void PistonMovingPiece::onPlace(Level *level, int x, int y, int z)
void PistonMovingPiece::onRemove(Level *level, int x, int y, int z, int id, int data)
{
- std::shared_ptr<TileEntity> tileEntity = level->getTileEntity(x, y, z);
+ shared_ptr<TileEntity> tileEntity = level->getTileEntity(x, y, z);
if (tileEntity != NULL && dynamic_pointer_cast<PistonPieceEntity>(tileEntity) != NULL)
{
dynamic_pointer_cast<PistonPieceEntity>(tileEntity)->finalTick();
@@ -58,7 +58,7 @@ bool PistonMovingPiece::isCubeShaped()
return false;
}
-bool PistonMovingPiece::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
+bool PistonMovingPiece::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
{
if( soundOnly) return false;
// this is a special case in order to help removing invisible, unbreakable, blocks in the world
@@ -80,7 +80,7 @@ void PistonMovingPiece::spawnResources(Level *level, int x, int y, int z, int da
{
if (level->isClientSide) return;
- std::shared_ptr<PistonPieceEntity> entity = getEntity(level, x, y, z);
+ shared_ptr<PistonPieceEntity> entity = getEntity(level, x, y, z);
if (entity == NULL)
{
return;
@@ -96,14 +96,14 @@ void PistonMovingPiece::neighborChanged(Level *level, int x, int y, int z, int t
}
}
-std::shared_ptr<TileEntity> PistonMovingPiece::newMovingPieceEntity(int block, int data, int facing, bool extending, bool isSourcePiston)
+shared_ptr<TileEntity> PistonMovingPiece::newMovingPieceEntity(int block, int data, int facing, bool extending, bool isSourcePiston)
{
- return std::shared_ptr<TileEntity>(new PistonPieceEntity(block, data, facing, extending, isSourcePiston));
+ return shared_ptr<TileEntity>(new PistonPieceEntity(block, data, facing, extending, isSourcePiston));
}
AABB *PistonMovingPiece::getAABB(Level *level, int x, int y, int z)
{
- std::shared_ptr<PistonPieceEntity> entity = getEntity(level, x, y, z);
+ shared_ptr<PistonPieceEntity> entity = getEntity(level, x, y, z);
if (entity == NULL)
{
return NULL;
@@ -118,9 +118,9 @@ AABB *PistonMovingPiece::getAABB(Level *level, int x, int y, int z)
return getAABB(level, x, y, z, entity->getId(), progress, entity->getFacing());
}
-void PistonMovingPiece::updateShape(LevelSource *level, int x, int y, int z, int forceData, std::shared_ptr<TileEntity> forceEntity) // 4J added forceData, forceEntity param
+void PistonMovingPiece::updateShape(LevelSource *level, int x, int y, int z, int forceData, shared_ptr<TileEntity> forceEntity) // 4J added forceData, forceEntity param
{
- std::shared_ptr<PistonPieceEntity> entity = dynamic_pointer_cast<PistonPieceEntity>(forceEntity);
+ shared_ptr<PistonPieceEntity> entity = dynamic_pointer_cast<PistonPieceEntity>(forceEntity);
if( entity == NULL ) entity = getEntity(level, x, y, z);
if (entity != NULL)
{
@@ -188,9 +188,9 @@ AABB *PistonMovingPiece::getAABB(Level *level, int x, int y, int z, int tile, fl
return aabb;
}
-std::shared_ptr<PistonPieceEntity> PistonMovingPiece::getEntity(LevelSource *level, int x, int y, int z)
+shared_ptr<PistonPieceEntity> PistonMovingPiece::getEntity(LevelSource *level, int x, int y, int z)
{
- std::shared_ptr<TileEntity> tileEntity = level->getTileEntity(x, y, z);
+ shared_ptr<TileEntity> tileEntity = level->getTileEntity(x, y, z);
if (tileEntity != NULL && dynamic_pointer_cast<PistonPieceEntity>(tileEntity) != NULL)
{
return dynamic_pointer_cast<PistonPieceEntity>(tileEntity);