Skip to content

Commit

Permalink
Fix onHarvest crash #5
Browse files Browse the repository at this point in the history
  • Loading branch information
RSwoop committed Feb 6, 2021
1 parent 305a12a commit 5a0bf2d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

version = '0.2.0'
version = '0.2.1'
group = 'com.therainbowville.minegasm'
archivesBaseName = 'minegasm'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public static void onHarvest(PlayerEvent.HarvestCheck event)
// ToolType. AXE, HOE, PICKAXE, SHOVEL
@SuppressWarnings("ConstantConditions") float blockHardness = block.getDefaultState().getBlockHardness(null, null);
LOGGER.debug("Harvest: tool: " +
Objects.requireNonNull(block.getHarvestTool(blockState)).getName() +
block.getHarvestTool(blockState) +
" can harvest? " + event.canHarvest() + " hardness: " + blockHardness);

int intensity = Math.toIntExact(Math.round((getIntensity("harvest") / 100.0 * (blockHardness / 50.0)) * 100));
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ license="Creative Commons Attribution Share Alike 4.0"
issueTrackerURL="https://github.com/RainbowVille/minegasm/issues"
[[mods]]
modId="minegasm"
version="0.2.0"
version="0.2.1"
displayName="Minegasm"
updateJSONURL="https://minegasm.therainbowville.com/updates.json"
displayURL="https://minegasm.therainbowville.com/"
Expand Down

0 comments on commit 5a0bf2d

Please sign in to comment.