4jcraft/targets/minecraft/world/level/tile/HalfTransparentTile.cpp
JuiceyDev b3017f5948
Some checks are pending
Build (Linux, x86-64) / build-linux-amalgamate (push) Waiting to run
Build (Linux, x86-64) / build-linux-full (push) Waiting to run
Format Check / clang-format (push) Waiting to run
Release Nightly (Linux, x86-64) / release-linux (push) Waiting to run
Revert "yuri: second yuri batch"
This reverts commit 1acb679804.
2026-04-07 13:06:37 +02:00

29 lines
978 B
C++

#include "HalfTransparentTile.h"
#include "minecraft/world/IconRegister.h"
#include "minecraft/world/level/LevelSource.h"
#include "minecraft/world/level/tile/Tile.h"
class Material;
HalfTransparentTile::HalfTransparentTile(int id, const std::wstring& tex,
Material* material, bool allowSame)
: Tile(id, material, false) {
this->allowSame = allowSame;
this->texture = tex;
}
bool HalfTransparentTile::isSolidRender(bool isServerLevel) { return false; }
bool HalfTransparentTile::shouldRenderFace(LevelSource* level, int x, int y,
int z, int face) {
int id = level->getTile(x, y, z);
if (!allowSame && id == this->id) return false;
return Tile::shouldRenderFace(level, x, y, z, face);
}
bool HalfTransparentTile::blocksLight() { return false; }
void HalfTransparentTile::registerIcons(IconRegister* iconRegister) {
icon = iconRegister->registerIcon(texture);
}