feat: blockstates

still a work in progress
This commit is contained in:
Fireblade
2026-05-02 15:14:48 -04:00
parent fc35ef155b
commit d89fadff68
80 changed files with 2249 additions and 2 deletions
+26
View File
@@ -21,6 +21,32 @@ TreeTile::TreeTile(int id) : RotatedPillarTile(id, Material::wood)
{
}
void TreeTile::createBlockStateDefinition()
{
if (!m_blockStateDefinition)
m_blockStateDefinition = new BlockStateDefinition(this);
}
int TreeTile::defaultBlockState()
{
return 0;
}
int TreeTile::convertBlockStateToLegacyData(BlockState *state)
{
return state ? (state->value & (MASK_TYPE | MASK_FACING)) : 0;
}
Tile::BlockState TreeTile::getBlockState(int data)
{
return Tile::BlockState(data & (MASK_TYPE | MASK_FACING));
}
Tile::BlockState TreeTile::getBlockState(LevelSource *level, int x, int y, int z)
{
return Tile::BlockState(level->getData(x, y, z) & (MASK_TYPE | MASK_FACING));
}
int TreeTile::getResourceCount(Random *random)
{
return 1;