public class ItemBlock extends Item
Item.ToolMaterial
IForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>
Modifier and Type | Field and Description |
---|---|
Block |
block |
ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, bFull3D, canRepair, hasSubtypes, itemRand, maxStackSize, REGISTRY
delegate
Modifier and Type | Method and Description |
---|---|
void |
addInformation(ItemStack stack,
EntityPlayer playerIn,
java.util.List<java.lang.String> tooltip,
boolean advanced)
allows items to add custom lines of information to the mouseover description
|
boolean |
canPlaceBlockOnSide(World worldIn,
BlockPos pos,
EnumFacing side,
EntityPlayer player,
ItemStack stack) |
Block |
getBlock() |
CreativeTabs |
getCreativeTab()
gets the CreativeTab this item is displayed on
|
void |
getSubItems(Item itemIn,
CreativeTabs tab,
NonNullList<ItemStack> subItems)
returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
|
java.lang.String |
getUnlocalizedName()
Returns the unlocalized name of this item.
|
java.lang.String |
getUnlocalizedName(ItemStack stack)
Returns the unlocalized name of this item.
|
EnumActionResult |
onItemUse(EntityPlayer player,
World worldIn,
BlockPos pos,
EnumHand hand,
EnumFacing facing,
float hitX,
float hitY,
float hitZ)
Called when a Block is right-clicked with this Item
|
boolean |
placeBlockAt(ItemStack stack,
EntityPlayer player,
World world,
BlockPos pos,
EnumFacing side,
float hitX,
float hitY,
float hitZ,
IBlockState newState)
Called to actually place the block, after the location is determined
and all permission checks have been made.
|
static boolean |
setTileEntityNBT(World worldIn,
EntityPlayer player,
BlockPos pos,
ItemStack stackIn) |
addPropertyOverride, canApplyAtEnchantingTable, canDestroyBlockInCreative, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getContainerItem, getContainerItem, getCreativeTabs, getDamage, getDefaultInstance, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getHighlightTip, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getNBTShareTag, getPropertyGetter, getRarity, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getStrVsBlock, getToolClasses, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasCustomProperties, hasEffect, hitEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isEnchantable, isFull3D, isMap, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemRightClick, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, rayTrace, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setUnlocalizedName, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBT
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
public final Block block
public ItemBlock(Block block)
public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
public static boolean setTileEntityNBT(World worldIn, EntityPlayer player, BlockPos pos, ItemStack stackIn)
public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, EnumFacing side, EntityPlayer player, ItemStack stack)
public java.lang.String getUnlocalizedName(ItemStack stack)
getUnlocalizedName
in class Item
public java.lang.String getUnlocalizedName()
getUnlocalizedName
in class Item
public CreativeTabs getCreativeTab()
getCreativeTab
in class Item
public void getSubItems(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> subItems)
getSubItems
in class Item
public void addInformation(ItemStack stack, EntityPlayer playerIn, java.util.List<java.lang.String> tooltip, boolean advanced)
addInformation
in class Item
public Block getBlock()
public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, IBlockState newState)
stack
- The item stack that was used to place the block. This can be changed inside the method.player
- The player who is placing the block. Can be null if the block is not being placed by a player.side
- The side the player (or machine) right-clicked on.