Skip to content

Commit

Permalink
Fix the Pattern Achieve and the Barrel O' Manuals!
Browse files Browse the repository at this point in the history
  • Loading branch information
blue42u committed May 13, 2014
1 parent 63b740e commit 0714879
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/tconstruct/util/TCraftingHandler.java
Expand Up @@ -25,22 +25,18 @@ public void onCrafting (ItemCraftedEvent event)// EntityPlayer player,
if (item == Item.getItemFromBlock(TRepo.toolStationWood))
{
TPlayerStats stats = TPlayerStats.get(event.player);
NBTTagCompound tags = event.player.getEntityData().getCompoundTag("TConstruct");
if (!tags.getBoolean("materialManual") || !stats.materialManual)
if (!stats.materialManual)
{
stats.materialManual = true;
tags.setBoolean("materialManual", true);
AbilityHelper.spawnItemAtPlayer(event.player, new ItemStack(TRepo.manualBook, 1, 1));
}
}
if (item == Item.getItemFromBlock(TRepo.smeltery) || item == Item.getItemFromBlock(TRepo.lavaTank))
{
TPlayerStats stats = TPlayerStats.get(event.player);
NBTTagCompound tags = event.player.getEntityData().getCompoundTag("TConstruct");
if (!tags.getBoolean("smelteryManual") || !stats.smelteryManual)
if (!stats.smelteryManual)
{
stats.smelteryManual = true;
tags.setBoolean("smelteryManual", true);
AbilityHelper.spawnItemAtPlayer(event.player, new ItemStack(TRepo.manualBook, 1, 2));
}
event.player.addStat(TAchievements.achievements.get("tconstruct:smelteryMaker"), 1);
Expand All @@ -50,6 +46,10 @@ public void onCrafting (ItemCraftedEvent event)// EntityPlayer player,
{
event.player.addStat(TAchievements.achievements.get("tconstruct:betterCrafting"), 1);
}
else if (item == TRepo.blankPattern)
{
event.player.addStat(TAchievements.achievements.get("tconstruct:pattern"), 1);
}
}
}

Expand Down

0 comments on commit 0714879

Please sign in to comment.