2013-08-23 16:59:50 +02:00
|
|
|
package com.pahimar.ee3.item;
|
|
|
|
|
2014-05-23 00:35:31 +02:00
|
|
|
import com.pahimar.ee3.reference.Key;
|
2014-04-01 22:11:52 +02:00
|
|
|
import com.pahimar.ee3.reference.Names;
|
2014-07-18 21:55:10 +02:00
|
|
|
import com.pahimar.ee3.util.IKeyBound;
|
2014-05-23 00:35:31 +02:00
|
|
|
import com.pahimar.ee3.util.LogHelper;
|
2014-04-01 22:11:52 +02:00
|
|
|
import com.pahimar.ee3.util.NBTHelper;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
2014-05-23 00:35:31 +02:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2014-04-01 22:11:52 +02:00
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
2014-05-23 00:35:31 +02:00
|
|
|
public class ItemMiniumStone extends ItemEE implements IKeyBound
|
2013-12-16 02:26:42 +01:00
|
|
|
{
|
2014-04-01 22:11:52 +02:00
|
|
|
public ItemMiniumStone()
|
|
|
|
{
|
|
|
|
super();
|
|
|
|
this.setUnlocalizedName(Names.Items.MINIUM_STONE);
|
|
|
|
this.setMaxDamage(1000); // TODO Get this from configs
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemStack)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean getShareTag()
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ItemStack getContainerItem(ItemStack itemStack)
|
|
|
|
{
|
|
|
|
ItemStack copiedStack = itemStack.copy();
|
|
|
|
|
|
|
|
copiedStack.setItemDamage(copiedStack.getItemDamage() + 1);
|
|
|
|
copiedStack.stackSize = 1;
|
|
|
|
|
|
|
|
return copiedStack;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
public boolean hasEffect(ItemStack itemStack, int renderPass)
|
|
|
|
{
|
|
|
|
return NBTHelper.hasTag(itemStack, Names.NBT.CRAFTING_GUI_OPEN) || NBTHelper.hasTag(itemStack, Names.NBT.TRANSMUTATION_GUI_OPEN);
|
|
|
|
}
|
2014-05-23 00:35:31 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void doKeyBindingAction(EntityPlayer entityPlayer, ItemStack itemStack, Key key)
|
|
|
|
{
|
2015-11-19 21:24:40 +01:00
|
|
|
LogHelper.info("{} {} {}", entityPlayer.toString(), itemStack.toString(), key.toString());
|
2014-05-23 00:35:31 +02:00
|
|
|
}
|
2013-08-23 16:59:50 +02:00
|
|
|
}
|