mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-23 20:09:46 +03:00
* Initial commit.
:)
This commit is contained in:
20
source/World/Tile/TransparentTile.cpp
Normal file
20
source/World/Tile/TransparentTile.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "Tile.hpp"
|
||||
#include "Level.hpp"
|
||||
|
||||
TransparentTile::TransparentTile(int ID, int texture, Material* mtl, bool bTransparent) :Tile(ID, texture, mtl)
|
||||
{
|
||||
m_bTransparent = bTransparent;
|
||||
}
|
||||
|
||||
bool TransparentTile::isSolidRender()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool TransparentTile::shouldRenderFace(LevelSource* level, int x, int y, int z, int dir)
|
||||
{
|
||||
if (!m_bTransparent && level->getTile(x, y, z) == m_ID)
|
||||
return false;
|
||||
|
||||
return Tile::shouldRenderFace(level, x, y, z, dir);
|
||||
}
|
||||
Reference in New Issue
Block a user