Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.mod.drakania.items;
- import net.minecraft.creativetab.CreativeTabs;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemStack;
- import net.minecraft.nbt.NBTTagCompound;
- import net.minecraft.world.World;
- import com.mod.drakania.DrakaMod;
- import com.mod.drakania.References;
- import cpw.mods.fml.common.registry.GameRegistry;
- /**
- * @author SCAREX
- *
- */
- public class ItemBackPack extends Item
- {
- public static final String NAME = "backpack";
- public ItemBackPack() {
- this.setUnlocalizedName(References.MOD_ID + ":backpack");
- this.setTextureName(References.MOD_ID + ":backpack");
- this.setCreativeTab(DrakaMod.DrakaMod);
- this.maxStackSize = 1; // N'oubliez pas ceci, çà empêche l'item d'être stackable
- this.register();
- }
- /**
- * Used to add the item to the game registry
- */
- public final void register() {
- GameRegistry.registerItem(this, NAME);
- }
- /**
- * Used to open the gui
- */
- @Override
- public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
- player.openGui(DrakaMod.INSTANCE, 0, world, (int) player.posX, (int) player.posY, (int) player.posZ);
- return stack;
- }
- }
Add Comment
Please, Sign In to add comment