mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
35 lines
1.1 KiB
Java
35 lines
1.1 KiB
Java
package com.hbm.items.tool;
|
|
|
|
import com.hbm.inventory.container.ContainerLemegeton;
|
|
import com.hbm.inventory.gui.GUILemegeton;
|
|
import com.hbm.main.MainRegistry;
|
|
import com.hbm.tileentity.IGUIProvider;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.inventory.Container;
|
|
import net.minecraft.item.Item;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.world.World;
|
|
|
|
public class ItemBookLemegeton extends Item implements IGUIProvider {
|
|
|
|
@Override
|
|
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
|
if(!world.isRemote) player.openGui(MainRegistry.instance, 0, world, 0, 0, 0);
|
|
return stack;
|
|
}
|
|
|
|
@Override
|
|
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
|
return new ContainerLemegeton(player.inventory);
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
|
return new GUILemegeton(player.inventory);
|
|
}
|
|
}
|