Skip to content

Commit

Permalink
Update UnitCrafting.java
Browse files Browse the repository at this point in the history
Possible fix for Vswe#28.
  • Loading branch information
iarspider committed Jun 3, 2015
1 parent 53a0852 commit 920151d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/vswe/production/page/unit/UnitCrafting.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ private void onCrafted(EntityPlayer player, ItemStack itemStack) {
}
Item item = itemStack.getItem();

try {
FMLCommonHandler.instance().firePlayerCraftingEvent(player, itemStack, inventoryCrafting);
}catch (Exception ex) {
ex.printStackTrace();
}
if(player != null) {
try {
FMLCommonHandler.instance().firePlayerCraftingEvent(player, itemStack, inventoryCrafting);
}catch (Exception ex) {
ex.printStackTrace();
}
player.addStat(StatList.objectCraftStats[Item.getIdFromItem(item)], itemStack.stackSize);
}
try {
Expand Down

0 comments on commit 920151d

Please sign in to comment.