public class BlockItem extends Item
Item.Properties
Modifier and Type | Field and Description |
---|---|
private Block |
block
Deprecated.
|
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, getAttributeModifiers, getContainerItem, getDefaultInstance, getDefaultTranslationKey, getDestroySpeed, getDisplayName, getDrinkSound, getEatSound, getFood, getGroup, getHarvestLevel, getIdFromItem, getIsRepairable, getItemById, getItemEnchantability, getItemFromBlock, getItemStackTileEntityRenderer, getMaxDamage, getMaxStackSize, getName, getPropertyGetter, getRarity, getTags, getToolTypes, getTranslationKey, getUseAction, getUseDuration, hasContainerItem, hasCustomProperties, hasEffect, hitEntity, inventoryTick, isComplex, isCrossbow, isDamageable, isEnchantable, isFood, isIn, isInGroup, isRepairable, itemInteractionForEntity, onBlockDestroyed, onCreated, onItemRightClick, onItemUseFinish, onPlayerStoppedUsing, onUse, rayTrace, shouldSyncTag, toString, updateItemStackNBT
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canHarvestBlock, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, 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
@Deprecated private final Block block
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)
private BlockState func_219985_a(BlockPos p_219985_1_, World p_219985_2_, ItemStack p_219985_3_, BlockState p_219985_4_)
private static <T extends java.lang.Comparable<T>> BlockState func_219988_a(BlockState p_219988_0_, IProperty<T> p_219988_1_, java.lang.String p_219988_2_)
protected boolean canPlace(BlockItemUseContext p_195944_1_, BlockState p_195944_2_)
protected boolean checkPosition()
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()
private Block getBlockRaw()
public void addToBlockToItemMap(java.util.Map<Block,Item> blockToItemMap, Item itemIn)