net.minecraft.item

public class BlockItem

extends Item

All mapped superinterfaces:

ItemConvertible, ToggleableFeature

net.minecraft.world.item.BlockItem
net.minecraft.world.item.BlockItem
net.minecraft.class_1747
net.minecraft.item.BlockItem

Field summary

Modifier and TypeField
private final Block
block
block
field_7901
block

Constructor summary

ModifierConstructor
public (Block block, Item$Settings settings)

Method summary

Modifier and TypeMethod
public ActionResult
useOn(UseOnContext context)
useOn(UseOnContext context)
method_7884(class_1838 arg0)
useOnBlock(ItemUsageContext arg0)
public ActionResult
place(BlockPlaceContext placeContext)
place(BlockPlaceContext placeContext)
method_7712(class_1750 arg0)
place(ItemPlacementContext context)
protected SoundEvent
getPlaceSound(BlockState blockState)
getPlaceSound(BlockState blockState)
method_19260(class_2680 arg0)
getPlaceSound(BlockState state)
public ItemPlacementContext
updatePlacementContext(BlockPlaceContext context)
updatePlacementContext(BlockPlaceContext context)
method_16356(class_1750 arg0)
getPlacementContext(ItemPlacementContext context)
private static void
updateBlockEntityComponents(Level level, BlockPos pos, ItemStack itemStack)
updateBlockEntityComponents(Level level, BlockPos pos, ItemStack itemStack)
method_57339(class_1937 arg0, class_2338 arg1, class_1799 arg2)
copyComponentsToBlockEntity(World world, BlockPos pos, ItemStack stack)
protected boolean
updateCustomBlockEntityTag(BlockPos pos, Level level, Player player, ItemStack itemStack, BlockState placedState)
updateCustomBlockEntityTag(BlockPos pos, Level level, Player player, ItemStack itemStack, BlockState placedState)
method_7710(class_2338 arg0, class_1937 arg1, class_1657 arg2, class_1799 arg3, class_2680 arg4)
postPlacement(BlockPos pos, World world, PlayerEntity player, ItemStack stack, BlockState state)
protected BlockState
getPlacementState(BlockPlaceContext context)
getPlacementState(BlockPlaceContext context)
method_7707(class_1750 arg0)
getPlacementState(ItemPlacementContext context)
private BlockState
updateBlockStateFromTag(BlockPos pos, Level level, ItemStack itemStack, BlockState placedState)
updateBlockStateFromTag(BlockPos pos, Level level, ItemStack itemStack, BlockState placedState)
method_18084(class_2338 arg0, class_1937 arg1, class_1799 arg2, class_2680 arg3)
placeFromNbt(BlockPos pos, World world, ItemStack stack, BlockState state)
protected boolean
canPlace(BlockPlaceContext context, BlockState stateForPlacement)
canPlace(BlockPlaceContext context, BlockState stateForPlacement)
method_7709(class_1750 arg0, class_2680 arg1)
canPlace(ItemPlacementContext context, BlockState state)
protected boolean
mustSurvive()
mustSurvive()
method_20360()
checkStatePlacement()
protected boolean
placeBlock(BlockPlaceContext context, BlockState placementState)
placeBlock(BlockPlaceContext context, BlockState placementState)
method_7708(class_1750 arg0, class_2680 arg1)
place(ItemPlacementContext context, BlockState state)
public static boolean
updateCustomBlockEntityTag(Level level, Player player, BlockPos pos, ItemStack itemStack)
updateCustomBlockEntityTag(Level level, Player player, BlockPos pos, ItemStack itemStack)
method_7714(class_1937 arg0, class_1657 arg1, class_2338 arg2, class_1799 arg3)
writeNbtToBlockEntity(World world, PlayerEntity player, BlockPos pos, ItemStack stack)
public boolean
shouldPrintOpWarning(ItemStack stack, Player player)
shouldPrintOpWarning(ItemStack stack, Player player)
method_65353(class_1799 arg0, class_1657 arg1)
shouldShowOperatorBlockWarnings(ItemStack arg0, PlayerEntity arg1)
public Block
getBlock()
getBlock()
method_7711()
getBlock()
public void
registerBlocks(Map<Block, Item> map, Item item)
registerBlocks(Map<Block, Item> map, Item item)
method_7713(Map<class_2248, class_1792> arg0, class_1792 arg1)
appendBlocks(Map<Block, Item> map, Item item)
public boolean
canFitInsideContainerItems()
canFitInsideContainerItems()
method_31568()
canBeNested()
public void
onDestroyed(ItemEntity entity)
onDestroyed(ItemEntity entity)
method_33261(class_1542 arg0)
onItemEntityDestroyed(ItemEntity arg0)
public static void
setBlockEntityData(ItemStack stack, BlockEntityType<?> type, TagValueOutput output)
setBlockEntityData(ItemStack stack, BlockEntityType<?> type, TagValueOutput output)
method_57338(class_1799 arg0, class_2591<?> arg1, class_11362 arg2)
setBlockEntityData(ItemStack stack, BlockEntityType<?> type, NbtWriteView view)