feat: blockstates

actually this time but might need to make a couple of fixes
This commit is contained in:
Fireblade
2026-05-04 21:26:13 -04:00
parent 0ee913e6e2
commit b750c4bbf4
28 changed files with 564 additions and 12 deletions
+26
View File
@@ -16,6 +16,32 @@ FarmTile::FarmTile(int id) : Tile(id, Material::dirt,isSolidRender())
setLightBlock(255);
}
void FarmTile::createBlockStateDefinition()
{
if (!m_blockStateDefinition)
m_blockStateDefinition = new BlockStateDefinition(this);
}
int FarmTile::defaultBlockState()
{
return 0;
}
int FarmTile::convertBlockStateToLegacyData(BlockState *state)
{
return state ? (state->value & 0x7) : 0;
}
Tile::BlockState FarmTile::getBlockState(int data)
{
return Tile::BlockState(data & 0x7);
}
Tile::BlockState FarmTile::getBlockState(LevelSource *level, int x, int y, int z)
{
return Tile::BlockState(level->getData(x, y, z) & 0x7);
}
// 4J Added override
void FarmTile::updateDefaultShape()
{