Class BlockTNT

All Implemented Interfaces:
BlockID, IBlockState, IMutableBlockState, AxisAlignedBB, Metadatable, RedstoneComponent, Cloneable

@PowerNukkitDifference(info="Implements RedstoneComponent.", since="1.4.0.0-PN") public class BlockTNT extends BlockSolid implements RedstoneComponent
Since:
2015/12/8
Author:
xtypr
  • Field Details

  • Constructor Details

    • BlockTNT

      public BlockTNT()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in class Block
    • getId

      public int getId()
      Specified by:
      getId in class Block
    • getProperties

      @Since("1.4.0.0-PN") @PowerNukkitOnly @NotNull public BlockProperties getProperties()
      Description copied from class: Block
      The properties that fully describe all possible and valid states that this block can have.
      Specified by:
      getProperties in interface IBlockState
      Overrides:
      getProperties in class Block
    • getHardness

      public double getHardness()
      Description copied from class: Block
      控制方块硬度
      Overrides:
      getHardness in class Block
      Returns:
      方块的硬度
    • getResistance

      public double getResistance()
      Description copied from class: Block
      控制方块爆炸抗性
      Overrides:
      getResistance in class Block
      Returns:
      方块的爆炸抗性
    • canBeActivated

      public boolean canBeActivated()
      Overrides:
      canBeActivated in class Block
    • getBurnChance

      public int getBurnChance()
      Description copied from class: Block
      这个值越大,这个方块本身越容易起火 返回-1,这个方块不能被点燃

      The higher this value, the more likely the block itself is to catch fire

      Overrides:
      getBurnChance in class Block
      Returns:
      the burn chance
    • getBurnAbility

      public int getBurnAbility()
      Description copied from class: Block
      这个值越大,越有可能被旁边的火焰引燃

      The higher this value, the more likely it is to be ignited by the fire next to it

      Overrides:
      getBurnAbility in class Block
    • prime

      public void prime()
    • prime

      public void prime(int fuse)
    • prime

      @PowerNukkitDifference(info="TNT Sound handled by EntityPrimedTNT", since="1.4.0.0-PN") public void prime(int fuse, Entity source)
    • onUpdate

      @PowerNukkitDifference(info="Using new method for checking if powered", since="1.4.0.0-PN") public int onUpdate(int type)
      Overrides:
      onUpdate in class Block
    • onActivate

      public boolean onActivate(@NotNull Item item, @Nullable Player player)
      Overrides:
      onActivate in class Block
    • onProjectileHit

      @Since("1.4.0.0-PN") @PowerNukkitOnly public boolean onProjectileHit(@NotNull Entity projectile, @NotNull Position position, @NotNull Vector3 motion)
      Overrides:
      onProjectileHit in class Block