public class ItemBlock extends Item
Item.ToolMaterialIForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>| Modifier and Type | Field and Description |
|---|---|
protected Block |
block |
ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, bFull3D, canRepair, hasSubtypes, itemRand, maxStackSize, REGISTRYdelegate| Modifier and Type | Method and Description |
|---|---|
void |
addInformation(ItemStack stack,
World worldIn,
java.util.List<java.lang.String> tooltip,
ITooltipFlag flagIn) |
boolean |
canPlaceBlockOnSide(World worldIn,
BlockPos pos,
EnumFacing side,
EntityPlayer player,
ItemStack stack) |
Block |
getBlock() |
private Block |
getBlockRaw() |
CreativeTabs |
getCreativeTab() |
void |
getSubItems(CreativeTabs tab,
NonNullList<ItemStack> items) |
java.lang.String |
getUnlocalizedName() |
java.lang.String |
getUnlocalizedName(ItemStack stack) |
EnumActionResult |
onItemUse(EntityPlayer player,
World worldIn,
BlockPos pos,
EnumHand hand,
EnumFacing facing,
float hitX,
float hitY,
float hitZ) |
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, canContinueUsing, canDestroyBlockInCreative, canDisableShield, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getContainerItem, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDefaultInstance, getDestroySpeed, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getFontRenderer, getForgeRarity, getHarvestLevel, getHasSubtypes, getHighlightTip, getHorseArmorTexture, getHorseArmorType, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemBurnTime, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getNBTShareTag, getPropertyGetter, getRarity, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getTileEntityItemStackRenderer, getToolClasses, getUnlocalizedNameInefficiently, getXpRepairRatio, hasContainerItem, hasContainerItem, hasCustomEntity, hasCustomProperties, hasEffect, hitEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isEnchantable, isFull3D, isInCreativeTab, isMap, isRepairable, isShield, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemRightClick, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, rayTrace, readNBTShareTag, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setTileEntityItemStackRenderer, setUnlocalizedName, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBTgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameprotected 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, @Nullable 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 Itempublic java.lang.String getUnlocalizedName()
getUnlocalizedName in class Itempublic CreativeTabs getCreativeTab()
getCreativeTab in class Itempublic void getSubItems(CreativeTabs tab, NonNullList<ItemStack> items)
getSubItems in class Itempublic void addInformation(ItemStack stack, @Nullable World worldIn, java.util.List<java.lang.String> tooltip, ITooltipFlag flagIn)
addInformation in class Itempublic Block getBlock()
private Block getBlockRaw()
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.