57 lines
1.8 KiB
Java
57 lines
1.8 KiB
Java
![]() |
package WayofTime.bloodmagic.item;
|
||
|
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
|
||
|
import net.minecraft.entity.player.EntityPlayer;
|
||
|
import net.minecraft.item.Item;
|
||
|
import net.minecraft.item.ItemStack;
|
||
|
import net.minecraft.util.EnumActionResult;
|
||
|
import net.minecraft.util.EnumFacing;
|
||
|
import net.minecraft.util.EnumHand;
|
||
|
import net.minecraft.util.math.BlockPos;
|
||
|
import net.minecraft.world.World;
|
||
|
import net.minecraftforge.fml.relauncher.Side;
|
||
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||
|
|
||
|
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||
|
import org.apache.commons.lang3.tuple.Pair;
|
||
|
|
||
|
import WayofTime.bloodmagic.BloodMagic;
|
||
|
import WayofTime.bloodmagic.api.Constants;
|
||
|
import WayofTime.bloodmagic.client.IVariantProvider;
|
||
|
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||
|
|
||
|
public class ItemExperienceBook extends Item implements IVariantProvider
|
||
|
{
|
||
|
public ItemExperienceBook()
|
||
|
{
|
||
|
setUnlocalizedName(Constants.Mod.MODID + ".experienceTome");
|
||
|
setRegistryName(Constants.BloodMagicItem.EXPERIENCE_TOME.getRegName());
|
||
|
setMaxStackSize(1);
|
||
|
setCreativeTab(BloodMagic.tabBloodMagic);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
@SideOnly(Side.CLIENT)
|
||
|
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
|
||
|
{
|
||
|
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.experienceTome"));
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
|
||
|
{
|
||
|
|
||
|
return EnumActionResult.FAIL;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public List<Pair<Integer, String>> getVariants()
|
||
|
{
|
||
|
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
|
||
|
ret.add(new ImmutablePair<Integer, String>(0, "type=experiencetome"));
|
||
|
return ret;
|
||
|
}
|
||
|
}
|