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

42 lines
1.2 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;
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-02-26 04:32:33 +01:00
import techreborn.items.ItemTR;
2015-04-17 21:12:58 +02:00
2016-02-26 04:32:33 +01:00
public class ItemTechManual extends ItemTR implements ITexturedItem {
2015-04-24 15:20:09 +02:00
2016-02-25 19:25:52 +01:00
public ItemTechManual() {
setCreativeTab(TechRebornCreativeTab.instance);
2016-02-25 19:25:52 +01:00
setUnlocalizedName("techreborn.manual");
setMaxStackSize(1);
}
2015-04-24 15:20:09 +02:00
@Override
2016-03-13 18:38:12 +01:00
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World world, EntityPlayer player, EnumHand hand) {
2016-02-25 19:25:52 +01:00
player.openGui(Core.INSTANCE, GuiHandler.manuelID, world,
(int) player.posX, (int) player.posY, (int) player.posY);
2016-03-13 18:38:12 +01:00
return new ActionResult<>(EnumActionResult.SUCCESS, itemStackIn);
}
2015-04-17 21:12:58 +02:00
2015-11-27 21:17:12 +01:00
@Override
public int getMaxMeta() {
return 1;
}
@Override
public String getTextureName(int damage) {
2016-02-26 04:32:33 +01:00
return "techreborn:items/tool/manual";
2015-11-27 21:17:12 +01:00
}
2015-04-17 21:12:58 +02:00
}