Skip to content

Commit

Permalink
add dust property check (#937)
Browse files Browse the repository at this point in the history
  • Loading branch information
brachy84 authored May 8, 2022
1 parent 61e2cd4 commit fd285fc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/gregtech/common/blocks/BlockCompressed.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ public String getHarvestTool(IBlockState state) {

@Override
public int getHarvestLevel(IBlockState state) {
// this is save because compressed blocks only generate for materials with dust property
return state.getValue(variantProperty).getBlockHarvestLevel();
Material material = state.getValue(variantProperty);
if (material.hasProperty(PropertyKey.DUST)) {
return material.getBlockHarvestLevel();
}
return 0;
}

@Nonnull
Expand Down

0 comments on commit fd285fc

Please sign in to comment.