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
+25
View File
@@ -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;