mirror of
https://git.neolegacy.dev/neoStudiosLCE/neoLegacy.git
synced 2026-12-01 08:38:20 +01:00
Merge branch 'pr-3' into TU43
This commit is contained in:
commit
8676650294
389 files changed
+7389
-4207
No files matched your search
@@ -14,9 +14,35 @@ ButtonTile::ButtonTile(int id, bool sensitive) : Tile(id, Material::decoration,
|
||||
setLightBlock(0);
|
||||
}
|
||||
|
||||
void ButtonTile::createBlockStateDefinition()
|
||||
{
|
||||
if (!m_blockStateDefinition)
|
||||
m_blockStateDefinition = new BlockStateDefinition(this);
|
||||
}
|
||||
|
||||
int ButtonTile::defaultBlockState()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ButtonTile::convertBlockStateToLegacyData(BlockState *state)
|
||||
{
|
||||
return state ? (state->value & 0xF) : 0;
|
||||
}
|
||||
|
||||
Tile::BlockState ButtonTile::getBlockState(int data)
|
||||
{
|
||||
return Tile::BlockState(data & 0xF);
|
||||
}
|
||||
|
||||
Tile::BlockState ButtonTile::getBlockState(LevelSource *level, int x, int y, int z)
|
||||
{
|
||||
return Tile::BlockState(level->getData(x, y, z) & 0xF);
|
||||
}
|
||||
|
||||
Icon *ButtonTile::getTexture(int face, int data)
|
||||
{
|
||||
if(id == Tile::button_wood_Id) return Tile::wood->getTexture(Facing::UP);
|
||||
if(id == Tile::wooden_button_Id) return Tile::wood->getTexture(Facing::UP);
|
||||
else return Tile::stone->getTexture(Facing::UP);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user