use of com.almuradev.content.type.block.type.crop.CropBlockImpl in project Almura by AlmuraDev.
the class IngameFarmersAlmanac method getBlockStateDefinition.
private static Optional<CropBlockStateDefinition> getBlockStateDefinition(IBlockState blockState) {
final Block block = blockState.getBlock();
if (block instanceof CropBlockImpl) {
final CropBlockImpl cropBlockImpl = (CropBlockImpl) block;
final int age = blockState.getValue(cropBlockImpl.getAgeProperty());
return Optional.of(cropBlockImpl.state(age));
}
return Optional.empty();
}
Aggregations