aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/BrewingStandTile.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/BrewingStandTile.cpp
parent8a2a62ea1d47364f802cf9aae97668bc4a7007b5 (diff)
Revert "shared_ptr -> std::shared_ptr"
This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5.
Diffstat (limited to 'Minecraft.World/BrewingStandTile.cpp')
-rw-r--r--Minecraft.World/BrewingStandTile.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/Minecraft.World/BrewingStandTile.cpp b/Minecraft.World/BrewingStandTile.cpp
index 2a6fd2cd..5f09ba02 100644
--- a/Minecraft.World/BrewingStandTile.cpp
+++ b/Minecraft.World/BrewingStandTile.cpp
@@ -29,9 +29,9 @@ int BrewingStandTile::getRenderShape()
return SHAPE_BREWING_STAND;
}
-std::shared_ptr<TileEntity> BrewingStandTile::newTileEntity(Level *level)
+shared_ptr<TileEntity> BrewingStandTile::newTileEntity(Level *level)
{
- return std::shared_ptr<TileEntity>(new BrewingStandTileEntity());
+ return shared_ptr<TileEntity>(new BrewingStandTileEntity());
}
bool BrewingStandTile::isCubeShaped()
@@ -39,7 +39,7 @@ bool BrewingStandTile::isCubeShaped()
return false;
}
-void BrewingStandTile::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes, std::shared_ptr<Entity> source)
+void BrewingStandTile::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes, shared_ptr<Entity> source)
{
setShape(7.0f / 16.0f, 0, 7.0f / 16.0f, 9.0f / 16.0f, 14.0f / 16.0f, 9.0f / 16.0f);
EntityTile::addAABBs(level, x, y, z, box, boxes, source);
@@ -52,7 +52,7 @@ void BrewingStandTile::updateDefaultShape()
setShape(0, 0, 0, 1, 2.0f / 16.0f, 1);
}
-bool BrewingStandTile::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 BrewingStandTile::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;
@@ -60,7 +60,7 @@ bool BrewingStandTile::use(Level *level, int x, int y, int z, std::shared_ptr<Pl
{
return true;
}
- std::shared_ptr<BrewingStandTileEntity> brewingStand = dynamic_pointer_cast<BrewingStandTileEntity>(level->getTileEntity(x, y, z));
+ shared_ptr<BrewingStandTileEntity> brewingStand = dynamic_pointer_cast<BrewingStandTileEntity>(level->getTileEntity(x, y, z));
if (brewingStand != NULL) player->openBrewingStand(brewingStand);
return true;
@@ -78,13 +78,13 @@ void BrewingStandTile::animateTick(Level *level, int xt, int yt, int zt, Random
void BrewingStandTile::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<BrewingStandTileEntity>(tileEntity) != NULL) )
{
- std::shared_ptr<BrewingStandTileEntity> container = dynamic_pointer_cast<BrewingStandTileEntity>(tileEntity);
+ shared_ptr<BrewingStandTileEntity> container = dynamic_pointer_cast<BrewingStandTileEntity>(tileEntity);
for (int i = 0; i < container->getContainerSize(); i++)
{
- std::shared_ptr<ItemInstance> item = container->getItem(i);
+ shared_ptr<ItemInstance> item = container->getItem(i);
if (item != NULL)
{
float xo = random->nextFloat() * 0.8f + 0.1f;
@@ -97,7 +97,7 @@ void BrewingStandTile::onRemove(Level *level, int x, int y, int z, int id, int d
if (count > item->count) count = item->count;
item->count -= count;
- std::shared_ptr<ItemEntity> itemEntity = std::shared_ptr<ItemEntity>(new ItemEntity(level, x + xo, y + yo, z + zo, std::shared_ptr<ItemInstance>( new ItemInstance(item->id, count, item->getAuxValue()))));
+ shared_ptr<ItemEntity> itemEntity = shared_ptr<ItemEntity>(new ItemEntity(level, x + xo, y + yo, z + zo, shared_ptr<ItemInstance>( new ItemInstance(item->id, count, item->getAuxValue()))));
float pow = 0.05f;
itemEntity->xd = (float) random->nextGaussian() * pow;
itemEntity->yd = (float) random->nextGaussian() * pow + 0.2f;