feat: blockstates
still a work in progress
This commit is contained in:
@@ -6,6 +6,31 @@ HayBlockTile::HayBlockTile(int id) : RotatedPillarTile(id, Material::grass)
|
||||
{
|
||||
}
|
||||
|
||||
void HayBlockTile::createBlockStateDefinition()
|
||||
{
|
||||
RotatedPillarTile::createBlockStateDefinition();
|
||||
}
|
||||
|
||||
int HayBlockTile::defaultBlockState()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int HayBlockTile::convertBlockStateToLegacyData(BlockState *state)
|
||||
{
|
||||
return state ? (state->value & MASK_FACING) : 0;
|
||||
}
|
||||
|
||||
Tile::BlockState HayBlockTile::getBlockState(int data)
|
||||
{
|
||||
return Tile::BlockState(data & MASK_FACING);
|
||||
}
|
||||
|
||||
Tile::BlockState HayBlockTile::getBlockState(LevelSource *level, int x, int y, int z)
|
||||
{
|
||||
return Tile::BlockState(level->getData(x, y, z) & MASK_FACING);
|
||||
}
|
||||
|
||||
int HayBlockTile::getRenderShape()
|
||||
{
|
||||
return SHAPE_TREE;
|
||||
|
||||
Reference in New Issue
Block a user