mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 05:02:39 +00:00
run repo through formatter
This commit is contained in:
1 parent
5585d680a3
commit
ffaea7d4b7
140 files changed
+1050
-892
No files matched your search
@@ -8,30 +8,38 @@ import tconstruct.blocks.logic.ToolForgeLogic;
|
||||
import tconstruct.library.event.ToolCraftedEvent;
|
||||
import tconstruct.library.tools.*;
|
||||
|
||||
public class TEventHandlerAchievement {
|
||||
public class TEventHandlerAchievement
|
||||
{
|
||||
|
||||
@SubscribeEvent
|
||||
public void onToolCrafted(ToolCraftedEvent event){
|
||||
if(event.player != null && !(event.player instanceof FakePlayer)){
|
||||
event.player.addStat(TAchievements.achievements.get("tconstruct.tinkerer"), 1);
|
||||
|
||||
if(event.tool != null && event.tool.getItem() instanceof Weapon){
|
||||
event.player.addStat(TAchievements.achievements.get("tconstruct.preparedFight"), 1);
|
||||
}
|
||||
|
||||
if(event.inventory != null && event.inventory instanceof ToolForgeLogic && event.tool.getItem() instanceof ToolCore && ((ToolCore)event.tool.getItem()).durabilityTypeExtra() != 0){
|
||||
event.player.addStat(TAchievements.achievements.get("tconstruct.proTinkerer"), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onToolCrafted (ToolCraftedEvent event)
|
||||
{
|
||||
if (event.player != null && !(event.player instanceof FakePlayer))
|
||||
{
|
||||
event.player.addStat(TAchievements.achievements.get("tconstruct.tinkerer"), 1);
|
||||
|
||||
if (event.tool != null && event.tool.getItem() instanceof Weapon)
|
||||
{
|
||||
event.player.addStat(TAchievements.achievements.get("tconstruct.preparedFight"), 1);
|
||||
}
|
||||
|
||||
if (event.inventory != null && event.inventory instanceof ToolForgeLogic && event.tool.getItem() instanceof ToolCore && ((ToolCore) event.tool.getItem()).durabilityTypeExtra() != 0)
|
||||
{
|
||||
event.player.addStat(TAchievements.achievements.get("tconstruct.proTinkerer"), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onItemPlacedIntoCasting(SmelteryEvent.ItemInsertedIntoCasting event){
|
||||
if(event.player != null && event.item != null){
|
||||
if(event.item.getItem() instanceof ToolCore){
|
||||
event.player.addStat(TAchievements.achievements.get("tconstruct.doingItWrong"), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onItemPlacedIntoCasting (SmelteryEvent.ItemInsertedIntoCasting event)
|
||||
{
|
||||
if (event.player != null && event.item != null)
|
||||
{
|
||||
if (event.item.getItem() instanceof ToolCore)
|
||||
{
|
||||
event.player.addStat(TAchievements.achievements.get("tconstruct.doingItWrong"), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user