feat: blockstates
still a work in progress
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user