Skip to content

Commit

Permalink
Fix crash on whitelist mod items used for harvesting. #7
Browse files Browse the repository at this point in the history
  • Loading branch information
wendall911 committed Jun 14, 2018
1 parent 711ed8a commit c62350f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod_name=TinkerSurvival
modid=tinkersurvival
mod_version=1.0.1.18
mod_version=1.0.1.19
last_mod_version=1.0.1.17
cf_release_type=release
minecraft_version=1.12.2
Expand Down
6 changes: 3 additions & 3 deletions files/updates.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"homepage": "https://minecraft.curseforge.com/projects/tinkersurvival",
"1.12.2": {
"1.0.1.18": "https://github.com/wendall911/TinkerSurvival/releases/tag/1.0.1.18",
"1.0.1.19": "https://github.com/wendall911/TinkerSurvival/releases/tag/1.0.1.19",
"1.0.1.17": "https://github.com/wendall911/TinkerSurvival/releases/tag/1.0.1.17",
"1.0.1.16": "https://github.com/wendall911/TinkerSurvival/releases/tag/1.0.1.16",
"1.0.1.15": "https://github.com/wendall911/TinkerSurvival/releases/tag/1.0.1.15",
Expand All @@ -13,7 +13,7 @@
"1.0.0.23": "https://github.com/wendall911/TinkerSurvival/releases/tag/1.0.0.23"
},
"promos": {
"1.12.2-latest": "1.0.1.18",
"1.12.2-recommended": "1.0.1.18"
"1.12.2-latest": "1.0.1.19",
"1.12.2-recommended": "1.0.1.19"
}
}
4 changes: 2 additions & 2 deletions src/main/java/tinkersurvival/event/HarvestEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public void slowMining(PlayerEvent.BreakSpeed event) {
}

if (neededToolClass != null) {
if (ItemUse.isWhitelistItem(heldItemStack)) {
String toolClass = ItemUse.getToolClass(heldItemStack);
String toolClass = ItemUse.getToolClass(heldItemStack);

if (ItemUse.isWhitelistItem(heldItemStack) && toolClass != null) {
if (neededToolClass.equals(toolClass)) {
if (heldItemStack.getItem().getHarvestLevel(heldItemStack, toolClass, null, null) >= neededHarvestLevel) {
return;
Expand Down

0 comments on commit c62350f

Please sign in to comment.