public class MCItemStack
extends java.lang.Object
implements crafttweaker.api.item.IItemStack
Modifier and Type | Field and Description |
---|---|
static crafttweaker.api.item.IItemStack |
EMPTY |
Constructor and Description |
---|
MCItemStack(net.minecraft.item.ItemStack itemStack) |
MCItemStack(net.minecraft.item.ItemStack itemStack,
boolean wildcardSize) |
Modifier and Type | Method and Description |
---|---|
void |
addEnchantment(crafttweaker.api.enchantments.IEnchantment enchantment) |
crafttweaker.api.item.IItemStack |
amount(int amount) |
crafttweaker.api.item.IItemStack |
anyAmount() |
crafttweaker.api.item.IIngredient |
anyDamage() |
crafttweaker.api.item.IItemStack |
applyNewTransform(crafttweaker.api.item.IItemStack item) |
crafttweaker.api.item.IItemStack |
applyTransform(crafttweaker.api.item.IItemStack item,
crafttweaker.api.player.IPlayer byPlayer) |
crafttweaker.api.block.IBlock |
asBlock() |
boolean |
canApplyAtEnchantingTable(crafttweaker.api.enchantments.IEnchantmentDefinition enchantment) |
boolean |
canDestroy(crafttweaker.api.block.IBlockDefinition block) |
boolean |
canEditBlocks() |
boolean |
canHarvestBlock(crafttweaker.api.block.IBlockState block) |
boolean |
canPlaceOn(crafttweaker.api.block.IBlockDefinition block) |
void |
clearCustomName() |
boolean |
contains(crafttweaker.api.item.IIngredient ingredient) |
crafttweaker.api.entity.IEntityItem |
createEntityItem(crafttweaker.api.world.IWorld world,
crafttweaker.api.world.IBlockPos pos) |
crafttweaker.api.entity.IEntityItem |
createEntityItem(crafttweaker.api.world.IWorld world,
int x,
int y,
int z) |
static MCItemStack |
createNonCopy(net.minecraft.item.ItemStack itemStack) |
void |
damageItem(int amount,
crafttweaker.api.entity.IEntity entity) |
boolean |
equals(java.lang.Object obj) |
int |
getAmount() |
float |
getBlockHardness() |
crafttweaker.api.item.IItemStack |
getContainerItem() |
int |
getDamage() |
crafttweaker.api.item.IItemDefinition |
getDefinition() |
java.lang.String |
getDisplayName() |
java.util.List<crafttweaker.api.enchantments.IEnchantment> |
getEnchantments() |
boolean |
getHasSubtypes() |
java.lang.Object |
getInternal() |
crafttweaker.api.item.IItemStack[] |
getItemArray() |
int |
getItemBurnTime() |
int |
getItemEnchantability() |
java.util.List<crafttweaker.api.item.IItemStack> |
getItems() |
crafttweaker.api.liquid.ILiquidStack |
getLiquid() |
java.util.List<crafttweaker.api.liquid.ILiquidStack> |
getLiquids() |
java.lang.String |
getMark() |
int |
getMaxDamage() |
int |
getMaxStackSize() |
int |
getMetadata() |
java.lang.String |
getName() |
java.util.List<crafttweaker.api.oredict.IOreDictEntry> |
getOres() |
int |
getRepairCost() |
float |
getStrengthAgainstBlock(crafttweaker.api.block.IBlockState blockState) |
crafttweaker.api.data.IData |
getTag() |
java.util.List<java.lang.String> |
getToolClasses() |
boolean |
hasContainerItem() |
boolean |
hasCustomEntity() |
boolean |
hasDisplayName() |
boolean |
hasEffect() |
int |
hashCode() |
boolean |
hasNewTransformers() |
boolean |
hasTag() |
boolean |
hasTransformers() |
boolean |
isBeaconPayment() |
boolean |
isDamageable() |
boolean |
isEmpty() |
boolean |
isItemDamaged() |
boolean |
isItemEnchantable() |
boolean |
isItemEnchanted() |
boolean |
isOnItemFrame() |
boolean |
isStackable() |
crafttweaker.api.item.IIngredient |
marked(java.lang.String mark) |
boolean |
matches(crafttweaker.api.item.IItemStack item) |
boolean |
matches(crafttweaker.api.liquid.ILiquidStack liquid) |
boolean |
matchesExact(crafttweaker.api.item.IItemStack item) |
crafttweaker.api.item.IIngredient |
only(crafttweaker.api.item.IItemCondition condition) |
crafttweaker.api.item.IIngredient |
or(crafttweaker.api.item.IIngredient ingredient) |
crafttweaker.api.item.WeightedItemStack |
percent(float chance) |
crafttweaker.api.item.IItemStack |
removeTag(java.lang.String tag) |
void |
setBlockHardness(float hardness) |
void |
setDisplayName(java.lang.String name) |
void |
setMaxDamage(int damage) |
void |
setMaxStackSize(int size) |
void |
setRepairCost(int repairCost) |
boolean |
showsDurabilityBar() |
crafttweaker.api.item.IItemStack |
splitStack(int amount) |
java.lang.String |
toCommandString() |
java.lang.String |
toString() |
crafttweaker.api.item.IIngredient |
transform(crafttweaker.api.item.IItemTransformer transformer) |
crafttweaker.api.item.IIngredient |
transformNew(crafttweaker.api.item.IItemTransformerNew transformer) |
crafttweaker.api.item.IItemStack |
updateTag(crafttweaker.api.data.IData tagUpdate) |
crafttweaker.api.item.IItemStack |
updateTag(crafttweaker.api.data.IData tagUpdate,
boolean matchTagExact) |
crafttweaker.api.item.WeightedItemStack |
weight(float chance) |
crafttweaker.api.item.IItemStack |
withAmount(int amount) |
crafttweaker.api.item.IItemStack |
withDamage(int damage) |
crafttweaker.api.item.IItemStack |
withDisplayName(java.lang.String name) |
crafttweaker.api.item.IItemStack |
withEmptyTag() |
crafttweaker.api.item.IItemStack |
withLore(java.lang.String[] lore) |
crafttweaker.api.item.IItemStack |
withTag(crafttweaker.api.data.IData tag) |
crafttweaker.api.item.IItemStack |
withTag(crafttweaker.api.data.IData tag,
boolean matchTagExact) |
public MCItemStack(net.minecraft.item.ItemStack itemStack)
public MCItemStack(net.minecraft.item.ItemStack itemStack, boolean wildcardSize)
public static MCItemStack createNonCopy(net.minecraft.item.ItemStack itemStack)
public crafttweaker.api.item.IItemDefinition getDefinition()
getDefinition
in interface crafttweaker.api.item.IItemStack
public java.lang.String getName()
getName
in interface crafttweaker.api.item.IItemStack
public java.lang.String getDisplayName()
getDisplayName
in interface crafttweaker.api.item.IItemStack
public void setDisplayName(java.lang.String name)
setDisplayName
in interface crafttweaker.api.item.IItemStack
public int getMaxStackSize()
getMaxStackSize
in interface crafttweaker.api.item.IItemStack
public void setMaxStackSize(int size)
setMaxStackSize
in interface crafttweaker.api.item.IItemStack
public float getBlockHardness()
getBlockHardness
in interface crafttweaker.api.item.IItemStack
public void setBlockHardness(float hardness)
setBlockHardness
in interface crafttweaker.api.item.IItemStack
public int getDamage()
getDamage
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.data.IData getTag()
getTag
in interface crafttweaker.api.item.IItemStack
public int getMaxDamage()
getMaxDamage
in interface crafttweaker.api.item.IItemStack
public void setMaxDamage(int damage)
setMaxDamage
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.liquid.ILiquidStack getLiquid()
getLiquid
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.IIngredient anyDamage()
anyDamage
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.IItemStack withDamage(int damage)
withDamage
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.IItemStack anyAmount()
anyAmount
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.IItemStack withAmount(int amount)
withAmount
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.IItemStack withTag(crafttweaker.api.data.IData tag, boolean matchTagExact)
withTag
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.IItemStack withTag(crafttweaker.api.data.IData tag)
withTag
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.IItemStack updateTag(crafttweaker.api.data.IData tagUpdate)
updateTag
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.IItemStack withEmptyTag()
withEmptyTag
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.IItemStack updateTag(crafttweaker.api.data.IData tagUpdate, boolean matchTagExact)
updateTag
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.IItemStack removeTag(java.lang.String tag)
removeTag
in interface crafttweaker.api.item.IItemStack
public java.lang.String getMark()
getMark
in interface crafttweaker.api.item.IIngredient
public int getAmount()
getAmount
in interface crafttweaker.api.item.IIngredient
public java.util.List<crafttweaker.api.item.IItemStack> getItems()
getItems
in interface crafttweaker.api.item.IIngredient
public crafttweaker.api.item.IItemStack[] getItemArray()
getItemArray
in interface crafttweaker.api.item.IIngredient
public java.util.List<crafttweaker.api.liquid.ILiquidStack> getLiquids()
getLiquids
in interface crafttweaker.api.item.IIngredient
public crafttweaker.api.item.IItemStack amount(int amount)
amount
in interface crafttweaker.api.item.IIngredient
amount
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.WeightedItemStack percent(float chance)
percent
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.WeightedItemStack weight(float chance)
weight
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.IIngredient transformNew(crafttweaker.api.item.IItemTransformerNew transformer)
transformNew
in interface crafttweaker.api.item.IIngredient
public crafttweaker.api.item.IIngredient only(crafttweaker.api.item.IItemCondition condition)
only
in interface crafttweaker.api.item.IIngredient
public crafttweaker.api.item.IIngredient marked(java.lang.String mark)
marked
in interface crafttweaker.api.item.IIngredient
public crafttweaker.api.item.IIngredient or(crafttweaker.api.item.IIngredient ingredient)
or
in interface crafttweaker.api.item.IIngredient
public boolean matches(crafttweaker.api.item.IItemStack item)
matches
in interface crafttweaker.api.item.IIngredient
public boolean matchesExact(crafttweaker.api.item.IItemStack item)
matchesExact
in interface crafttweaker.api.item.IIngredient
public boolean matches(crafttweaker.api.liquid.ILiquidStack liquid)
matches
in interface crafttweaker.api.item.IIngredient
public boolean contains(crafttweaker.api.item.IIngredient ingredient)
contains
in interface crafttweaker.api.item.IIngredient
public crafttweaker.api.item.IItemStack applyTransform(crafttweaker.api.item.IItemStack item, crafttweaker.api.player.IPlayer byPlayer)
applyTransform
in interface crafttweaker.api.item.IIngredient
public crafttweaker.api.item.IItemStack applyNewTransform(crafttweaker.api.item.IItemStack item)
applyNewTransform
in interface crafttweaker.api.item.IIngredient
public boolean hasNewTransformers()
hasNewTransformers
in interface crafttweaker.api.item.IIngredient
public boolean hasTransformers()
hasTransformers
in interface crafttweaker.api.item.IIngredient
public crafttweaker.api.item.IIngredient transform(crafttweaker.api.item.IItemTransformer transformer)
transform
in interface crafttweaker.api.item.IIngredient
public java.lang.Object getInternal()
getInternal
in interface crafttweaker.api.item.IIngredient
public crafttweaker.api.block.IBlock asBlock()
asBlock
in interface crafttweaker.api.item.IItemStack
public java.util.List<crafttweaker.api.oredict.IOreDictEntry> getOres()
getOres
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.IItemStack withDisplayName(java.lang.String name)
withDisplayName
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.IItemStack withLore(java.lang.String[] lore)
withLore
in interface crafttweaker.api.item.IItemStack
public java.util.List<java.lang.String> getToolClasses()
getToolClasses
in interface crafttweaker.api.item.IItemStack
public int getItemEnchantability()
getItemEnchantability
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.IItemStack getContainerItem()
getContainerItem
in interface crafttweaker.api.item.IItemStack
public boolean hasContainerItem()
hasContainerItem
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.entity.IEntityItem createEntityItem(crafttweaker.api.world.IWorld world, int x, int y, int z)
createEntityItem
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.entity.IEntityItem createEntityItem(crafttweaker.api.world.IWorld world, crafttweaker.api.world.IBlockPos pos)
createEntityItem
in interface crafttweaker.api.item.IItemStack
public boolean isBeaconPayment()
isBeaconPayment
in interface crafttweaker.api.item.IItemStack
public boolean canPlaceOn(crafttweaker.api.block.IBlockDefinition block)
canPlaceOn
in interface crafttweaker.api.item.IItemStack
public boolean canDestroy(crafttweaker.api.block.IBlockDefinition block)
canDestroy
in interface crafttweaker.api.item.IItemStack
public boolean canHarvestBlock(crafttweaker.api.block.IBlockState block)
canHarvestBlock
in interface crafttweaker.api.item.IItemStack
public int getRepairCost()
getRepairCost
in interface crafttweaker.api.item.IItemStack
public void setRepairCost(int repairCost)
setRepairCost
in interface crafttweaker.api.item.IItemStack
public boolean canEditBlocks()
canEditBlocks
in interface crafttweaker.api.item.IItemStack
public boolean isOnItemFrame()
isOnItemFrame
in interface crafttweaker.api.item.IItemStack
public boolean isItemEnchanted()
isItemEnchanted
in interface crafttweaker.api.item.IItemStack
public boolean isItemDamaged()
isItemDamaged
in interface crafttweaker.api.item.IItemStack
public boolean isDamageable()
isDamageable
in interface crafttweaker.api.item.IItemStack
public boolean isStackable()
isStackable
in interface crafttweaker.api.item.IItemStack
public void addEnchantment(crafttweaker.api.enchantments.IEnchantment enchantment)
addEnchantment
in interface crafttweaker.api.item.IItemStack
public boolean canApplyAtEnchantingTable(crafttweaker.api.enchantments.IEnchantmentDefinition enchantment)
canApplyAtEnchantingTable
in interface crafttweaker.api.item.IItemStack
public java.util.List<crafttweaker.api.enchantments.IEnchantment> getEnchantments()
getEnchantments
in interface crafttweaker.api.item.IItemStack
public boolean isItemEnchantable()
isItemEnchantable
in interface crafttweaker.api.item.IItemStack
public boolean hasEffect()
hasEffect
in interface crafttweaker.api.item.IItemStack
public boolean hasDisplayName()
hasDisplayName
in interface crafttweaker.api.item.IItemStack
public void clearCustomName()
clearCustomName
in interface crafttweaker.api.item.IItemStack
public boolean hasTag()
hasTag
in interface crafttweaker.api.item.IItemStack
public void damageItem(int amount, crafttweaker.api.entity.IEntity entity)
damageItem
in interface crafttweaker.api.item.IItemStack
public int getMetadata()
getMetadata
in interface crafttweaker.api.item.IItemStack
public boolean getHasSubtypes()
getHasSubtypes
in interface crafttweaker.api.item.IItemStack
public float getStrengthAgainstBlock(crafttweaker.api.block.IBlockState blockState)
getStrengthAgainstBlock
in interface crafttweaker.api.item.IItemStack
public crafttweaker.api.item.IItemStack splitStack(int amount)
splitStack
in interface crafttweaker.api.item.IItemStack
public boolean isEmpty()
isEmpty
in interface crafttweaker.api.item.IItemStack
public int getItemBurnTime()
getItemBurnTime
in interface crafttweaker.api.item.IItemStack
public boolean showsDurabilityBar()
showsDurabilityBar
in interface crafttweaker.api.item.IItemStack
public boolean hasCustomEntity()
hasCustomEntity
in interface crafttweaker.api.item.IItemStack
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toCommandString()
toCommandString
in interface crafttweaker.api.item.IIngredient