From 119bff351450ea16ffda550b6e0f67379b29f708 Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 17:37:16 +0700 Subject: Revert "shared_ptr -> std::shared_ptr" This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5. --- Minecraft.World/HalfSlabTile.cpp | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'Minecraft.World/HalfSlabTile.cpp') diff --git a/Minecraft.World/HalfSlabTile.cpp b/Minecraft.World/HalfSlabTile.cpp index 9bbcbedb..ed3969c1 100644 --- a/Minecraft.World/HalfSlabTile.cpp +++ b/Minecraft.World/HalfSlabTile.cpp @@ -22,56 +22,56 @@ HalfSlabTile::HalfSlabTile(int id, bool fullSize, Material *material) : Tile(id, { this->fullSize = fullSize; - if (fullSize) + if (fullSize) { solid[id] = true; - } - else + } + else { setShape(0, 0, 0, 1, 0.5f, 1); } setLightBlock(255); } -void HalfSlabTile::updateShape(LevelSource *level, int x, int y, int z, int forceData, std::shared_ptr forceEntity) // 4J added forceData, forceEntity param +void HalfSlabTile::updateShape(LevelSource *level, int x, int y, int z, int forceData, shared_ptr forceEntity) // 4J added forceData, forceEntity param { - if (fullSize) + if (fullSize) { setShape(0, 0, 0, 1, 1, 1); - } - else + } + else { bool upper = (level->getData(x, y, z) & TOP_SLOT_BIT) != 0; - if (upper) + if (upper) { setShape(0, 0.5f, 0, 1, 1, 1); - } - else + } + else { setShape(0, 0, 0, 1, 0.5f, 1); } } } -void HalfSlabTile::updateDefaultShape() +void HalfSlabTile::updateDefaultShape() { - if (fullSize) + if (fullSize) { setShape(0, 0, 0, 1, 1, 1); - } - else + } + else { setShape(0, 0, 0, 1, 0.5f, 1); } } -void HalfSlabTile::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes, std::shared_ptr source) +void HalfSlabTile::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes, shared_ptr source) { updateShape(level, x, y, z); Tile::addAABBs(level, x, y, z, box, boxes, source); } -bool HalfSlabTile::isSolidRender(bool isServerLevel) +bool HalfSlabTile::isSolidRender(bool isServerLevel) { return fullSize; } @@ -87,30 +87,30 @@ int HalfSlabTile::getPlacedOnFaceDataValue(Level *level, int x, int y, int z, in return itemValue; } -int HalfSlabTile::getResourceCount(Random *random) +int HalfSlabTile::getResourceCount(Random *random) { - if (fullSize) + if (fullSize) { return 2; } return 1; } -int HalfSlabTile::getSpawnResourcesAuxValue(int data) +int HalfSlabTile::getSpawnResourcesAuxValue(int data) { return data & TYPE_MASK; } -bool HalfSlabTile::isCubeShaped() +bool HalfSlabTile::isCubeShaped() { return fullSize; } -bool HalfSlabTile::shouldRenderFace(LevelSource *level, int x, int y, int z, int face) +bool HalfSlabTile::shouldRenderFace(LevelSource *level, int x, int y, int z, int face) { if (fullSize) return Tile::shouldRenderFace(level, x, y, z, face); - if (face != Facing::UP && face != Facing::DOWN && !Tile::shouldRenderFace(level, x, y, z, face)) + if (face != Facing::UP && face != Facing::DOWN && !Tile::shouldRenderFace(level, x, y, z, face)) { return false; } @@ -121,13 +121,13 @@ bool HalfSlabTile::shouldRenderFace(LevelSource *level, int x, int y, int z, int oz += Facing::STEP_Z[Facing::OPPOSITE_FACING[face]]; boolean isUpper = (level->getData(ox, oy, oz) & TOP_SLOT_BIT) != 0; - if (isUpper) + if (isUpper) { if (face == Facing::DOWN) return true; if (face == Facing::UP && Tile::shouldRenderFace(level, x, y, z, face)) return true; return !(isHalfSlab(level->getTile(x, y, z)) && (level->getData(x, y, z) & TOP_SLOT_BIT) != 0); - } - else + } + else { if (face == Facing::UP) return true; if (face == Facing::DOWN && Tile::shouldRenderFace(level, x, y, z, face)) return true; @@ -135,7 +135,7 @@ bool HalfSlabTile::shouldRenderFace(LevelSource *level, int x, int y, int z, int } } -bool HalfSlabTile::isHalfSlab(int tileId) +bool HalfSlabTile::isHalfSlab(int tileId) { return tileId == Tile::stoneSlabHalf_Id || tileId == Tile::woodSlabHalf_Id; } -- cgit v1.2.3