use of gregtech.api.unification.material.properties.DustProperty in project GregTech by GregTechCEu.
the class BlockOre method getHarvestLevel.
@Override
public int getHarvestLevel(IBlockState state) {
StoneType stoneType = state.getValue(STONE_TYPE);
if (material != null) {
DustProperty matProp = material.getProperty(PropertyKey.DUST);
if (matProp != null) {
int toolQuality = matProp.getHarvestLevel();
DustProperty stoneProp = stoneType.stoneMaterial.getProperty(PropertyKey.DUST);
if (stoneProp != null) {
return Math.max(stoneProp.getHarvestLevel(), toolQuality > 1 ? toolQuality - 1 : toolQuality);
}
}
}
return 1;
}
use of gregtech.api.unification.material.properties.DustProperty in project GregTech by GregTechCEu.
the class BlockCompressed method getHarvestLevel.
@Override
public int getHarvestLevel(IBlockState state) {
Material material = state.getValue(variantProperty);
DustProperty prop = material.getProperty(PropertyKey.DUST);
if (prop != null) {
return material.getHarvestLevel();
}
return 0;
}
Aggregations