类 DropExperienceBlock

所有已实现的接口:
FeatureElement, ItemLike, IBlockExtension
直接已知子类:
SculkBlock

public class DropExperienceBlock extends Block
  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • codec

      public com.mojang.serialization.MapCodec<? extends DropExperienceBlock> codec()
      覆盖:
      codec 在类中 Block
    • spawnAfterBreak

      protected void spawnAfterBreak(BlockState p_221086_, ServerLevel p_221087_, BlockPos p_221088_, ItemStack p_221089_, boolean p_221090_)
      覆盖:
      spawnAfterBreak 在类中 BlockBehaviour
    • getExpDrop

      public int getExpDrop(BlockState state, LevelAccessor level, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity breaker, ItemStack tool)
      从接口复制的说明: IBlockExtension
      Returns how many experience points this block drops when broken, before application of enchantments.
      参数:
      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
      返回:
      The amount of experience points dropped by this block