public class ItemBlock extends Item
Item.ToolMaterial| Modifier and Type | Field and Description |
|---|---|
Block |
block |
bFull3D, canRepair, delegate, hasSubtypes, itemModifierUUID, itemRand, itemRegistry, maxStackSize| Modifier and Type | Method and 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,
java.util.List<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.
|
boolean |
onItemUse(ItemStack stack,
EntityPlayer playerIn,
World worldIn,
BlockPos pos,
EnumFacing side,
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 pos,
BlockPos stack,
ItemStack p_179224_3_) |
ItemBlock |
setUnlocalizedName(java.lang.String unlocalizedName)
Sets the unlocalized name of this item to the string passed as the parameter, prefixed by "item."
|
addInformation, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getArmorModel, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getChestGenBase, getColorFromItemStack, getContainerItem, getContainerItem, getCreativeTabs, getDamage, getDigSpeed, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getHighlightTip, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getModel, getMovingObjectPositionFromPlayer, getPotionEffect, getRarity, getRegistryName, getShareTag, getSmeltingExperience, getStrVsBlock, getToolClasses, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasEffect, hitEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isFull3D, isItemTool, isMap, isPotionIngredient, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemRightClick, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setPotionEffect, setRegistryName, setRegistryName, setRegistryName, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBTpublic final Block block
public ItemBlock(Block block)
public ItemBlock setUnlocalizedName(java.lang.String unlocalizedName)
setUnlocalizedName in class Itempublic boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ)
public static boolean setTileEntityNBT(World worldIn, EntityPlayer pos, BlockPos stack, ItemStack p_179224_3_)
public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, EnumFacing side, EntityPlayer player, ItemStack stack)
public java.lang.String getUnlocalizedName(ItemStack stack)
getUnlocalizedName in class Itempublic java.lang.String getUnlocalizedName()
getUnlocalizedName in class Itempublic CreativeTabs getCreativeTab()
getCreativeTab in class Itempublic void getSubItems(Item itemIn, CreativeTabs tab, java.util.List<ItemStack> subItems)
getSubItems in class Itempublic 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.