mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
46 lines
1.2 KiB
Java
46 lines
1.2 KiB
Java
package com.hbm.items.special;
|
|
|
|
import java.util.List;
|
|
|
|
import com.hbm.inventory.container.ContainerBook;
|
|
import com.hbm.inventory.gui.GUIBook;
|
|
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 ItemBook extends Item implements IGUIProvider {
|
|
|
|
@Override
|
|
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
|
|
|
list.add("Edition 4, gold lined pages");
|
|
}
|
|
|
|
@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 ContainerBook(player.inventory);
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
|
return new GUIBook(player.inventory);
|
|
}
|
|
}
|