public class BlockItem extends Item
Item.Properties
ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, BLOCK_TO_ITEM, canRepair, group, properties, random
delegate
Constructor and Description |
---|
BlockItem(Block blockIn,
Item.Properties builder) |
addPropertyOverride, asItem, canHarvestBlock, canPlayerBreakBlockWhileHolding, func_219972_a, getAttributeModifiers, getContainerItem, getDefaultInstance, getDefaultTranslationKey, getDestroySpeed, getDisplayName, getFood, getGroup, getHarvestLevel, getIdFromItem, getIsRepairable, getItemById, getItemEnchantability, getItemFromBlock, getMaxDamage, getMaxStackSize, getName, getPropertyGetter, getRarity, getTags, getTileEntityItemStackRenderer, getToolTypes, getTranslationKey, getUseAction, getUseDuration, hasContainerItem, hasCustomProperties, hasEffect, hitEntity, inventoryTick, isComplex, isCrossbow, isDamageable, isEnchantable, isFood, isIn, isInGroup, isRepairable, itemInteractionForEntity, onBlockDestroyed, onCreated, onItemRightClick, onItemUseFinish, onPlayerStoppedUsing, rayTrace, shouldSyncTag, toString, updateItemStackNBT
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canEquip, canHarvestBlock, createEntity, damageItem, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getFontRenderer, getHighlightTip, getItem, getItemEnchantability, getItemStackLimit, getMaxDamage, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getXpRepairRatio, hasContainerItem, hasCustomEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamaged, isShield, onArmorTick, onBlockStartBreak, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, renderHelmetOverlay, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, showDurabilityBar
public BlockItem(Block blockIn, Item.Properties builder)
public ActionResultType onItemUse(ItemUseContext context)
public ActionResultType tryPlace(BlockItemUseContext context)
@Deprecated protected SoundEvent getPlaceSound(BlockState state)
protected SoundEvent getPlaceSound(BlockState state, World world, BlockPos pos, PlayerEntity entity)
@Nullable public BlockItemUseContext getBlockItemUseContext(BlockItemUseContext context)
protected boolean onBlockPlaced(BlockPos pos, World worldIn, @Nullable PlayerEntity player, ItemStack stack, BlockState state)
@Nullable protected BlockState getStateForPlacement(BlockItemUseContext context)
protected boolean canPlace(BlockItemUseContext p_195944_1_, BlockState p_195944_2_)
protected boolean func_219987_d()
protected boolean placeBlock(BlockItemUseContext context, BlockState state)
public static boolean setTileEntityNBT(World worldIn, @Nullable PlayerEntity player, BlockPos pos, ItemStack stackIn)
public java.lang.String getTranslationKey()
getTranslationKey
in class Item
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items)
fillItemGroup
in class Item
public void addInformation(ItemStack stack, @Nullable World worldIn, java.util.List<ITextComponent> tooltip, ITooltipFlag flagIn)
addInformation
in class Item
public Block getBlock()
public void addToBlockToItemMap(java.util.Map<Block,Item> blockToItemMap, Item itemIn)