Files
TinkersConstruct/src/main/java/tconstruct/tools/inventory/SlotFrypan.java
T
Arthur Uzulin 80efde613a The return of achievements
- Re-added achievements
- Organised all imports (seemed all over the place)
- Formatted all code (seemed very combined, used the TinkerStyle)
2014-09-09 18:30:15 +10:00

37 lines
1.1 KiB
Java

package tconstruct.tools.inventory;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.*;
import net.minecraft.item.*;
import net.minecraft.nbt.NBTTagCompound;
import tconstruct.achievements.TAchievements;
public class SlotFrypan extends Slot
{
public EntityPlayer player;
public SlotFrypan(IInventory par1IInventory, int par2, int par3, int par4, EntityPlayer player)
{
super(par1IInventory, par2, par3, par4);
this.player = player;
}
@Override
public void putStack (ItemStack par1ItemStack)
{
super.putStack(par1ItemStack);
if (par1ItemStack != null && par1ItemStack.getItem() != null && par1ItemStack.getItem() instanceof ItemFood && par1ItemStack.hasTagCompound())
{
NBTTagCompound stackTagCompound = par1ItemStack.getTagCompound();
if (stackTagCompound == null || !stackTagCompound.getBoolean("frypanKill"))
{
return;
}
TAchievements.triggerAchievement(player, "tconstruct.dualConvenience");
}
}
}