Package net.minecraft.world.item
Class BlockItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.BlockItem
- All Implemented Interfaces:
- FeatureElement,- ItemLike,- IForgeItem
- Direct Known Subclasses:
- BedItem,- DoubleHighBlockItem,- GameMasterBlockItem,- ItemNameBlockItem,- PlaceOnWaterBlockItem,- ScaffoldingBlockItem,- SolidBucketItem,- StandingAndWallBlockItem
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.world.item.ItemItem.Properties
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final BlockDeprecated.static final Stringstatic final StringFields inherited from class net.minecraft.world.item.ItemBASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZEFields inherited from interface net.minecraft.world.flag.FeatureElementFILTERED_REGISTRIES
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidappendHoverText(ItemStack p_40572_, Level p_40573_, List<Component> p_40574_, TooltipFlag p_40575_) booleanprotected booleancanPlace(BlockPlaceContext p_40611_, BlockState p_40612_) getBlock()static CompoundTaggetBlockEntityData(ItemStack p_186337_) private Blockprotected BlockStategetPlacementState(BlockPlaceContext p_40613_) protected SoundEventgetPlaceSound(BlockState p_40588_) Deprecated.protected SoundEventgetPlaceSound(BlockState state, Level world, BlockPos pos, Player entity) protected booleanvoidonDestroyed(ItemEntity p_150700_) place(BlockPlaceContext p_40577_) protected booleanplaceBlock(BlockPlaceContext p_40578_, BlockState p_40579_) voidregisterBlocks(Map<Block, Item> p_40607_, Item p_40608_) voidremoveFromBlockToItemMap(Map<Block, Item> blockToItemMap, Item itemIn) static voidsetBlockEntityData(ItemStack p_186339_, BlockEntityType<?> p_186340_, CompoundTag p_186341_) private BlockStateupdateBlockStateFromTag(BlockPos p_40603_, Level p_40604_, ItemStack p_40605_, BlockState p_40606_) protected booleanupdateCustomBlockEntityTag(BlockPos p_40597_, Level p_40598_, Player p_40599_, ItemStack p_40600_, BlockState p_40601_) static booleanupdateCustomBlockEntityTag(Level p_40583_, Player p_40584_, BlockPos p_40585_, ItemStack p_40586_) updatePlacementContext(BlockPlaceContext p_40609_) private static <T extends Comparable<T>>
 BlockStateupdateState(BlockState p_40594_, Property<T> p_40595_, String p_40596_) useOn(UseOnContext p_40581_) Methods inherited from class net.minecraft.world.item.ItemasItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, shouldOverrideMultiplayerNbt, toString, use, useOnRelease, verifyTagAfterLoadMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElementisEnabledMethods inherited from interface net.minecraftforge.common.extensions.IForgeItemcanApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, initCapabilities, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onInventoryTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
- 
Field Details- 
BLOCK_ENTITY_TAG- See Also:
 
- 
BLOCK_STATE_TAG- See Also:
 
- 
blockDeprecated.
 
- 
- 
Constructor Details- 
BlockItem
 
- 
- 
Method Details- 
useOn
- 
place
- 
getPlaceSoundDeprecated.
- 
getPlaceSound
- 
updatePlacementContext
- 
updateCustomBlockEntityTagprotected boolean updateCustomBlockEntityTag(BlockPos p_40597_, Level p_40598_, @Nullable Player p_40599_, ItemStack p_40600_, BlockState p_40601_) 
- 
getPlacementState
- 
updateBlockStateFromTagprivate BlockState updateBlockStateFromTag(BlockPos p_40603_, Level p_40604_, ItemStack p_40605_, BlockState p_40606_) 
- 
updateStateprivate static <T extends Comparable<T>> BlockState updateState(BlockState p_40594_, Property<T> p_40595_, String p_40596_) 
- 
canPlace
- 
mustSurviveprotected boolean mustSurvive()
- 
placeBlock
- 
updateCustomBlockEntityTag
- 
getDescriptionId- Overrides:
- getDescriptionIdin class- Item
 
- 
appendHoverTextpublic void appendHoverText(ItemStack p_40572_, @Nullable Level p_40573_, List<Component> p_40574_, TooltipFlag p_40575_) - Overrides:
- appendHoverTextin class- Item
 
- 
getBlock
- 
getBlockRaw
- 
registerBlocks
- 
removeFromBlockToItemMap
- 
canFitInsideContainerItemspublic boolean canFitInsideContainerItems()- Overrides:
- canFitInsideContainerItemsin class- Item
 
- 
onDestroyed- Overrides:
- onDestroyedin class- Item
 
- 
getBlockEntityData
- 
setBlockEntityDatapublic static void setBlockEntityData(ItemStack p_186339_, BlockEntityType<?> p_186340_, CompoundTag p_186341_) 
- 
requiredFeatures- Specified by:
- requiredFeaturesin interface- FeatureElement
- Overrides:
- requiredFeaturesin class- Item
 
 
-