TechReborn/src/main/java/techreborn/items/tools/ItemTechManual.java

50 lines
1.5 KiB
Java
Raw Normal View History

package techreborn.items.tools;
2015-04-17 21:12:58 +02:00
2016-02-26 04:32:33 +01:00
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
2015-04-18 13:13:22 +02:00
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
2016-03-13 18:38:12 +01:00
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
2016-03-27 20:40:10 +02:00
import net.minecraft.util.text.TextFormatting;
2016-06-04 12:40:52 +02:00
import net.minecraft.util.text.translation.I18n;
2015-04-18 13:13:22 +02:00
import net.minecraft.world.World;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
2016-03-14 14:28:33 +01:00
import techreborn.items.ItemTextureBase;
2015-04-17 21:12:58 +02:00
2016-10-08 21:46:16 +02:00
import java.util.List;
2016-10-08 21:46:16 +02:00
public class ItemTechManual extends ItemTextureBase implements ITexturedItem {
public ItemTechManual() {
setCreativeTab(TechRebornCreativeTab.instance);
setUnlocalizedName("techreborn.manual");
setMaxStackSize(1);
}
@Override
2016-11-19 13:50:08 +01:00
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player,
2016-10-08 21:46:16 +02:00
EnumHand hand) {
player.openGui(Core.INSTANCE, GuiHandler.manuelID, world, (int) player.posX, (int) player.posY,
2016-10-08 21:46:16 +02:00
(int) player.posY);
2016-11-19 13:50:08 +01:00
return new ActionResult<>(EnumActionResult.SUCCESS, player.getHeldItem(hand));
}
@Override
2016-10-08 21:46:16 +02:00
public int getMaxMeta() {
return 1;
}
@Override
2016-10-08 21:46:16 +02:00
public String getTextureName(int damage) {
return "techreborn:items/tool/manual";
}
2016-10-08 21:46:16 +02:00
@Override
2016-10-08 21:46:16 +02:00
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced) {
tooltip.add(TextFormatting.RED + I18n.translateToLocal("tooltip.wip"));
}
2015-04-17 21:12:58 +02:00
}