Interface BlockItemExtension
- All Known Implementing Classes:
BannerItem, BlockItem, BlockItemWithAlternatives, DoubleHighBlockItem, GameMasterBlockItem, HangingSignItem, PlaceOnWaterBlockItem, PlayerHeadItem, ScaffoldingBlockItem, SolidBucketItem, StandingAndWallBlockItem
public interface BlockItemExtension
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonBlockPlacedBy(BlockPlaceContext context, Level level, BlockPos pos, BlockState state, @Nullable Player placer, ItemStack stack) Called after the block was placed by this block item and afterBlock.setPlacedBy(Level, BlockPos, BlockState, LivingEntity, ItemStack)was called.
-
Method Details
-
onBlockPlacedBy
default void onBlockPlacedBy(BlockPlaceContext context, Level level, BlockPos pos, BlockState state, @Nullable Player placer, ItemStack stack) Called after the block was placed by this block item and afterBlock.setPlacedBy(Level, BlockPos, BlockState, LivingEntity, ItemStack)was called.- Parameters:
context- The place context used to place the blocklevel- The level the block was placed inpos- The position the block was placed atstate- The state of the placed blockplacer- The player who placed the block, if availablestack- The stack used to place the block
-