2015-04-18 22:24:49 +02:00
|
|
|
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-03-14 14:28:33 +01:00
|
|
|
import techreborn.items.ItemTextureBase;
|
2015-04-17 21:12:58 +02:00
|
|
|
|
2016-03-14 14:28:33 +01:00
|
|
|
public class ItemTechManual extends ItemTextureBase implements ITexturedItem {
|
2015-04-24 15:20:09 +02:00
|
|
|
|
2016-02-25 19:25:52 +01:00
|
|
|
public ItemTechManual() {
|
2015-08-09 12:05:32 +02:00
|
|
|
setCreativeTab(TechRebornCreativeTab.instance);
|
2016-02-25 19:25:52 +01:00
|
|
|
setUnlocalizedName("techreborn.manual");
|
2015-08-09 12:05:32 +02:00
|
|
|
setMaxStackSize(1);
|
|
|
|
}
|
2015-04-24 15:20:09 +02:00
|
|
|
|
|
|
|
|
2015-08-09 12:05:32 +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,
|
2015-08-09 12:05:32 +02:00
|
|
|
(int) player.posX, (int) player.posY, (int) player.posY);
|
2016-03-13 18:38:12 +01:00
|
|
|
return new ActionResult<>(EnumActionResult.SUCCESS, itemStackIn);
|
2015-08-09 12:05:32 +02:00
|
|
|
}
|
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
|
|
|
}
|