YATS/Forge Documentation
|
Public Member Functions | |
ItemStack (Block par1Block) | |
ItemStack (Block par1Block, int par2) | |
ItemStack (Block par1Block, int par2, int par3) | |
ItemStack (Item par1Item) | |
ItemStack (Item par1Item, int par2) | |
ItemStack (Item par1Item, int par2, int par3) | |
ItemStack (int par1, int par2, int par3) | |
ItemStack | splitStack (int par1) |
Item | getItem () |
Icon | getIconIndex () |
int | getItemSpriteNumber () |
boolean | tryPlaceItemIntoWorld (EntityPlayer par1EntityPlayer, World par2World, int par3, int par4, int par5, int par6, float par7, float par8, float par9) |
float | getStrVsBlock (Block par1Block) |
ItemStack | useItemRightClick (World par1World, EntityPlayer par2EntityPlayer) |
ItemStack | onFoodEaten (World par1World, EntityPlayer par2EntityPlayer) |
NBTTagCompound | writeToNBT (NBTTagCompound par1NBTTagCompound) |
void | readFromNBT (NBTTagCompound par1NBTTagCompound) |
int | getMaxStackSize () |
boolean | isStackable () |
boolean | isItemStackDamageable () |
boolean | getHasSubtypes () |
boolean | isItemDamaged () |
int | getItemDamageForDisplay () |
int | getItemDamage () |
void | setItemDamage (int par1) |
int | getMaxDamage () |
boolean | attemptDamageItem (int par1, Random par2Random) |
void | damageItem (int par1, EntityLiving par2EntityLiving) |
void | hitEntity (EntityLiving par1EntityLiving, EntityPlayer par2EntityPlayer) |
void | onBlockDestroyed (World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer) |
int | getDamageVsEntity (Entity par1Entity) |
boolean | canHarvestBlock (Block par1Block) |
boolean | interactWith (EntityLiving par1EntityLiving) |
ItemStack | copy () |
boolean | isItemEqual (ItemStack par1ItemStack) |
String | getItemName () |
String | toString () |
void | updateAnimation (World par1World, Entity par2Entity, int par3, boolean par4) |
void | onCrafting (World par1World, EntityPlayer par2EntityPlayer, int par3) |
int | getMaxItemUseDuration () |
EnumAction | getItemUseAction () |
void | onPlayerStoppedUsing (World par1World, EntityPlayer par2EntityPlayer, int par3) |
boolean | hasTagCompound () |
NBTTagCompound | getTagCompound () |
NBTTagList | getEnchantmentTagList () |
void | setTagCompound (NBTTagCompound par1NBTTagCompound) |
String | getDisplayName () |
void | setItemName (String par1Str) |
boolean | hasDisplayName () |
List | getTooltip (EntityPlayer par1EntityPlayer, boolean par2) |
boolean | hasEffect () |
EnumRarity | getRarity () |
boolean | isItemEnchantable () |
void | addEnchantment (Enchantment par1Enchantment, int par2) |
boolean | isItemEnchanted () |
void | setTagInfo (String par1Str, NBTBase par2NBTBase) |
boolean | func_82835_x () |
boolean | isOnItemFrame () |
void | setItemFrame (EntityItemFrame par1EntityItemFrame) |
EntityItemFrame | getItemFrame () |
int | getRepairCost () |
void | setRepairCost (int par1) |
Static Public Member Functions | |
static ItemStack | loadItemStackFromNBT (NBTTagCompound par0NBTTagCompound) |
static boolean | areItemStackTagsEqual (ItemStack par0ItemStack, ItemStack par1ItemStack) |
static boolean | areItemStacksEqual (ItemStack par0ItemStack, ItemStack par1ItemStack) |
static ItemStack | copyItemStack (ItemStack par0ItemStack) |
Public Attributes | |
int | stackSize |
int | animationsToGo |
int | itemID |
NBTTagCompound | stackTagCompound |
net.minecraft.item.ItemStack.ItemStack | ( | Block | par1Block) |
net.minecraft.item.ItemStack.ItemStack | ( | Block | par1Block, |
int | par2 | ||
) |
net.minecraft.item.ItemStack.ItemStack | ( | Block | par1Block, |
int | par2, | ||
int | par3 | ||
) |
net.minecraft.item.ItemStack.ItemStack | ( | Item | par1Item) |
net.minecraft.item.ItemStack.ItemStack | ( | Item | par1Item, |
int | par2 | ||
) |
net.minecraft.item.ItemStack.ItemStack | ( | Item | par1Item, |
int | par2, | ||
int | par3 | ||
) |
net.minecraft.item.ItemStack.ItemStack | ( | int | par1, |
int | par2, | ||
int | par3 | ||
) |
void net.minecraft.item.ItemStack.addEnchantment | ( | Enchantment | par1Enchantment, |
int | par2 | ||
) |
Adds an enchantment with a desired level on the ItemStack.
|
static |
boolean net.minecraft.item.ItemStack.attemptDamageItem | ( | int | par1, |
Random | par2Random | ||
) |
Attempts to damage the ItemStack with par1 amount of damage, If the ItemStack has the Unbreaking enchantment there is a chance for each point of damage to be negated. Returns true if it takes more damage than getMaxDamage(). Returns false otherwise or if the ItemStack can't be damaged or if all points of damage are negated.
boolean net.minecraft.item.ItemStack.canHarvestBlock | ( | Block | par1Block) |
Checks if the itemStack object can harvest a specified block
ItemStack net.minecraft.item.ItemStack.copy | ( | ) |
Returns a new stack with the same properties.
Creates a copy of a ItemStack, a null parameters will return a null.
void net.minecraft.item.ItemStack.damageItem | ( | int | par1, |
EntityLiving | par2EntityLiving | ||
) |
Damages the item in the ItemStack
boolean net.minecraft.item.ItemStack.func_82835_x | ( | ) |
int net.minecraft.item.ItemStack.getDamageVsEntity | ( | Entity | par1Entity) |
Returns the damage against a given entity.
String net.minecraft.item.ItemStack.getDisplayName | ( | ) |
returns the display name of the itemstack
NBTTagList net.minecraft.item.ItemStack.getEnchantmentTagList | ( | ) |
boolean net.minecraft.item.ItemStack.getHasSubtypes | ( | ) |
Icon net.minecraft.item.ItemStack.getIconIndex | ( | ) |
Returns the icon index of the current stack.
Item net.minecraft.item.ItemStack.getItem | ( | ) |
Returns the object corresponding to the stack.
int net.minecraft.item.ItemStack.getItemDamage | ( | ) |
gets the damage of an itemstack
int net.minecraft.item.ItemStack.getItemDamageForDisplay | ( | ) |
gets the damage of an itemstack, for displaying purposes
EntityItemFrame net.minecraft.item.ItemStack.getItemFrame | ( | ) |
Return the item frame this stack is on. Returns null if not on an item frame.
String net.minecraft.item.ItemStack.getItemName | ( | ) |
int net.minecraft.item.ItemStack.getItemSpriteNumber | ( | ) |
EnumAction net.minecraft.item.ItemStack.getItemUseAction | ( | ) |
int net.minecraft.item.ItemStack.getMaxDamage | ( | ) |
Returns the max damage an item in the stack can take.
int net.minecraft.item.ItemStack.getMaxItemUseDuration | ( | ) |
int net.minecraft.item.ItemStack.getMaxStackSize | ( | ) |
Returns maximum size of the stack.
EnumRarity net.minecraft.item.ItemStack.getRarity | ( | ) |
int net.minecraft.item.ItemStack.getRepairCost | ( | ) |
Get this stack's repair cost, or 0 if no repair cost is defined.
float net.minecraft.item.ItemStack.getStrVsBlock | ( | Block | par1Block) |
Returns the strength of the stack against a given block.
NBTTagCompound net.minecraft.item.ItemStack.getTagCompound | ( | ) |
Returns the NBTTagCompound of the ItemStack.
List net.minecraft.item.ItemStack.getTooltip | ( | EntityPlayer | par1EntityPlayer, |
boolean | par2 | ||
) |
Return a list of strings containing information about the item
boolean net.minecraft.item.ItemStack.hasDisplayName | ( | ) |
Returns true if the itemstack has a display name
boolean net.minecraft.item.ItemStack.hasEffect | ( | ) |
boolean net.minecraft.item.ItemStack.hasTagCompound | ( | ) |
Returns true if the ItemStack has an NBTTagCompound. Currently used to store enchantments.
void net.minecraft.item.ItemStack.hitEntity | ( | EntityLiving | par1EntityLiving, |
EntityPlayer | par2EntityPlayer | ||
) |
Calls the corresponding fct in di
boolean net.minecraft.item.ItemStack.interactWith | ( | EntityLiving | par1EntityLiving) |
boolean net.minecraft.item.ItemStack.isItemDamaged | ( | ) |
returns true when a damageable item is damaged
boolean net.minecraft.item.ItemStack.isItemEnchantable | ( | ) |
True if it is a tool and has no enchantments to begin with
boolean net.minecraft.item.ItemStack.isItemEnchanted | ( | ) |
True if the item has enchantment data
boolean net.minecraft.item.ItemStack.isItemEqual | ( | ItemStack | par1ItemStack) |
boolean net.minecraft.item.ItemStack.isItemStackDamageable | ( | ) |
true if this itemStack is damageable
boolean net.minecraft.item.ItemStack.isOnItemFrame | ( | ) |
Return whether this stack is on an item frame.
boolean net.minecraft.item.ItemStack.isStackable | ( | ) |
Returns true if the ItemStack can hold 2 or more units of the item.
|
static |
void net.minecraft.item.ItemStack.onBlockDestroyed | ( | World | par1World, |
int | par2, | ||
int | par3, | ||
int | par4, | ||
int | par5, | ||
EntityPlayer | par6EntityPlayer | ||
) |
void net.minecraft.item.ItemStack.onCrafting | ( | World | par1World, |
EntityPlayer | par2EntityPlayer, | ||
int | par3 | ||
) |
ItemStack net.minecraft.item.ItemStack.onFoodEaten | ( | World | par1World, |
EntityPlayer | par2EntityPlayer | ||
) |
void net.minecraft.item.ItemStack.onPlayerStoppedUsing | ( | World | par1World, |
EntityPlayer | par2EntityPlayer, | ||
int | par3 | ||
) |
Called when the player releases the use item button. Args: world, entityplayer, itemInUseCount
void net.minecraft.item.ItemStack.readFromNBT | ( | NBTTagCompound | par1NBTTagCompound) |
Read the stack fields from a NBT object.
void net.minecraft.item.ItemStack.setItemDamage | ( | int | par1) |
Sets the item damage of the ItemStack.
void net.minecraft.item.ItemStack.setItemFrame | ( | EntityItemFrame | par1EntityItemFrame) |
Set the item frame this stack is on.
void net.minecraft.item.ItemStack.setItemName | ( | String | par1Str) |
Sets the item's name (used by anvil to rename the items).
void net.minecraft.item.ItemStack.setRepairCost | ( | int | par1) |
Set this stack's repair cost.
void net.minecraft.item.ItemStack.setTagCompound | ( | NBTTagCompound | par1NBTTagCompound) |
Assigns a NBTTagCompound to the ItemStack, minecraft validates that only non-stackable items can have it.
void net.minecraft.item.ItemStack.setTagInfo | ( | String | par1Str, |
NBTBase | par2NBTBase | ||
) |
ItemStack net.minecraft.item.ItemStack.splitStack | ( | int | par1) |
Remove the argument from the stack size. Return a new stack object with argument size.
String net.minecraft.item.ItemStack.toString | ( | ) |
boolean net.minecraft.item.ItemStack.tryPlaceItemIntoWorld | ( | EntityPlayer | par1EntityPlayer, |
World | par2World, | ||
int | par3, | ||
int | par4, | ||
int | par5, | ||
int | par6, | ||
float | par7, | ||
float | par8, | ||
float | par9 | ||
) |
void net.minecraft.item.ItemStack.updateAnimation | ( | World | par1World, |
Entity | par2Entity, | ||
int | par3, | ||
boolean | par4 | ||
) |
Called each tick as long the ItemStack in on player inventory. Used to progress the pickup animation and update maps.
ItemStack net.minecraft.item.ItemStack.useItemRightClick | ( | World | par1World, |
EntityPlayer | par2EntityPlayer | ||
) |
Called whenever this item stack is equipped and right clicked. Returns the new item stack to put in the position where this item is. Args: world, player
NBTTagCompound net.minecraft.item.ItemStack.writeToNBT | ( | NBTTagCompound | par1NBTTagCompound) |
Write the stack fields to a NBT object. Return the new NBT object.
int net.minecraft.item.ItemStack.animationsToGo |
Number of animation frames to go when receiving an item (by walking into it, for example).
int net.minecraft.item.ItemStack.itemID |
ID of the item.
int net.minecraft.item.ItemStack.stackSize |
Size of the stack.
NBTTagCompound net.minecraft.item.ItemStack.stackTagCompound |
A NBTTagMap containing data about an ItemStack. Can only be used for non stackable items