Package net.minecraft.world.item
Class BlockItem
java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<Item>
net.minecraft.world.item.Item
net.minecraft.world.item.BlockItem
- All Implemented Interfaces:
ItemLike
,IForgeItem
,IForgeRegistryEntry<Item>
- Direct Known Subclasses:
BedItem
,DoubleHighBlockItem
,GameMasterBlockItem
,ItemNameBlockItem
,ScaffoldingBlockItem
,SolidBucketItem
,StandingAndWallBlockItem
,WaterLilyBlockItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
Item.Properties
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
Field Summary
Fields inherited from class net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, category, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendHoverText(ItemStack p_40572_, Level p_40573_, List<Component> p_40574_, TooltipFlag p_40575_)
boolean
protected boolean
canPlace(BlockPlaceContext p_40611_, BlockState p_40612_)
void
fillItemCategory(CreativeModeTab p_40569_, NonNullList<ItemStack> p_40570_)
getBlock()
private Block
protected BlockState
getPlacementState(BlockPlaceContext p_40613_)
protected SoundEvent
getPlaceSound(BlockState p_40588_)
Deprecated.protected SoundEvent
getPlaceSound(BlockState state, Level world, BlockPos pos, Player entity)
protected boolean
void
onDestroyed(ItemEntity p_150700_)
place(BlockPlaceContext p_40577_)
protected boolean
placeBlock(BlockPlaceContext p_40578_, BlockState p_40579_)
void
registerBlocks(Map<Block,Item> p_40607_, Item p_40608_)
void
removeFromBlockToItemMap(Map<Block,Item> blockToItemMap, Item itemIn)
private BlockState
updateBlockStateFromTag(BlockPos p_40603_, Level p_40604_, ItemStack p_40605_, BlockState p_40606_)
protected boolean
updateCustomBlockEntityTag(BlockPos p_40597_, Level p_40598_, Player p_40599_, ItemStack p_40600_, BlockState p_40601_)
static boolean
updateCustomBlockEntityTag(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.Item
allowdedIn, asItem, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getEquipSound, getFoodProperties, getId, getItemCategory, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTags, 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, verifyTagAfterLoad
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canPerformAction, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getArmorTexture, getAttributeModifiers, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getHighlightTip, getItemEnchantability, getItemStackLimit, getMaxDamage, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getSweepHitBox, getXpRepairRatio, hasContainerItem, hasCustomEntity, initCapabilities, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isPiglinCurrency, isShield, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, showDurabilityBar
-
Field Details
-
BLOCK_ENTITY_TAG
- See Also:
- Constant Field Values
-
BLOCK_STATE_TAG
- See Also:
- Constant Field Values
-
block
Deprecated.
-
-
Constructor Details
-
BlockItem
-
-
Method Details
-
useOn
-
place
-
getPlaceSound
Deprecated. -
getPlaceSound
-
updatePlacementContext
-
updateCustomBlockEntityTag
protected boolean updateCustomBlockEntityTag(BlockPos p_40597_, Level p_40598_, @Nullable Player p_40599_, ItemStack p_40600_, BlockState p_40601_) -
getPlacementState
-
updateBlockStateFromTag
private BlockState updateBlockStateFromTag(BlockPos p_40603_, Level p_40604_, ItemStack p_40605_, BlockState p_40606_) -
updateState
private static <T extends Comparable<T>> BlockState updateState(BlockState p_40594_, Property<T> p_40595_, String p_40596_) -
canPlace
-
mustSurvive
protected boolean mustSurvive() -
placeBlock
-
updateCustomBlockEntityTag
-
getDescriptionId
- Overrides:
getDescriptionId
in classItem
-
fillItemCategory
- Overrides:
fillItemCategory
in classItem
-
appendHoverText
public void appendHoverText(ItemStack p_40572_, @Nullable Level p_40573_, List<Component> p_40574_, TooltipFlag p_40575_)- Overrides:
appendHoverText
in classItem
-
getBlock
-
getBlockRaw
-
registerBlocks
-
removeFromBlockToItemMap
-
canFitInsideContainerItems
public boolean canFitInsideContainerItems()- Overrides:
canFitInsideContainerItems
in classItem
-
onDestroyed
- Overrides:
onDestroyed
in classItem
-