Class DropExperienceBlock

All Implemented Interfaces:
FeatureElement, ItemLike, IBlockExtension
Direct Known Subclasses:
SculkBlock

public class DropExperienceBlock extends Block
  • Field Details

  • Constructor Details

  • Method Details

    • codec

      public com.mojang.serialization.MapCodec<? extends DropExperienceBlock> codec()
      Overrides:
      codec in class Block
    • spawnAfterBreak

      protected void spawnAfterBreak(BlockState p_221086_, ServerLevel p_221087_, BlockPos p_221088_, ItemStack p_221089_, boolean p_221090_)
      Overrides:
      spawnAfterBreak in class BlockBehaviour
    • getExpDrop

      public int getExpDrop(BlockState state, LevelAccessor level, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity breaker, ItemStack tool)
      Description copied from interface: IBlockExtension
      Returns how many experience points this block drops when broken, before application of enchantments.
      Parameters:
      state - The state of the block being broken
      level - The level
      pos - The position of the block being broken
      blockEntity - The block entity, if any
      breaker - The entity who broke the block, if known
      tool - The item stack used to break the block. May be empty
      Returns:
      The amount of experience points dropped by this block