Class BlockCauldron

All Implemented Interfaces:
BlockEntityHolder<BlockEntityCauldron>, BlockID, IBlockState, IMutableBlockState, AxisAlignedBB, Metadatable, Cloneable
Direct Known Subclasses:
BlockCauldronLava

@PowerNukkitDifference(since="1.4.0.0-PN", info="Implements BlockEntityHolder only in PowerNukkit") public class BlockCauldron extends BlockSolidMeta implements BlockEntityHolder<BlockEntityCauldron>
Author:
CreeperFace (Nukkit Project)
  • Field Details

  • Constructor Details

    • BlockCauldron

      public BlockCauldron()
    • BlockCauldron

      public BlockCauldron(int meta)
  • Method Details

    • getId

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

      @Since("1.4.0.0-PN") @PowerNukkitOnly @Nonnull 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
      Specified by:
      getProperties in class BlockMeta
    • getBlockEntityType

      @PowerNukkitOnly @Since("1.4.0.0-PN") @Nonnull public String getBlockEntityType()
      Specified by:
      getBlockEntityType in interface BlockEntityHolder<BlockEntityCauldron>
    • getBlockEntityClass

      @Since("1.4.0.0-PN") @PowerNukkitOnly @Nonnull public Class<? extends BlockEntityCauldron> getBlockEntityClass()
      Specified by:
      getBlockEntityClass in interface BlockEntityHolder<BlockEntityCauldron>
    • getName

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

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

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

      public int getToolType()
      Description copied from class: Block
      控制挖掘方块的工具类型
      Overrides:
      getToolType in class Block
      Returns:
      挖掘方块的工具类型
    • canBeActivated

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

      public boolean isFull()
    • isEmpty

      public boolean isEmpty()
    • getFillLevel

      @PowerNukkitOnly public int getFillLevel()
    • setFillLevel

      @PowerNukkitOnly public void setFillLevel(int fillLevel)
    • setFillLevel

      @PowerNukkitXOnly @Since("1.19.21-r4") public void setFillLevel(int fillLevel, @Nullable Player player)
    • getCauldronLiquid

      @PowerNukkitXOnly @Since("1.6.0.0-PNX") public CauldronLiquid getCauldronLiquid()
    • setCauldronLiquid

      @PowerNukkitXOnly @Since("1.6.0.0-PNX") public void setCauldronLiquid(CauldronLiquid liquid)
    • onActivate

      public boolean onActivate(@Nonnull Item item, Player player)
      Overrides:
      onActivate in class Block
    • replaceBucket

      protected void replaceBucket(Item oldBucket, Player player, Item newBucket)
    • clearWithFizz

      @PowerNukkitOnly public void clearWithFizz(BlockEntityCauldron cauldron)
    • clearWithFizz

      public void clearWithFizz(BlockEntityCauldron cauldron, @Nullable Player player)
    • place

      public boolean place(@Nonnull Item item, @Nonnull Block block, @Nonnull Block target, @Nonnull BlockFace face, double fx, double fy, double fz, Player player)
      Description copied from class: Block
      Place and initialize a this block correctly in the world.

      The current instance must have level, x, y, z, and layer properties already set before calling this method.

      Overrides:
      place in class Block
      Parameters:
      item - The item being used to place the block. Should be used as an optional reference, may mismatch the block that is being placed depending on plugin implementations.
      block - The current block that is in the world and is getting replaced by this instance. It has the same x, y, z, layer, and level as this block.
      target - The block that was clicked to create the place action in this block position.
      face - The face that was clicked in the target block
      fx - The detailed X coordinate of the clicked target block face
      fy - The detailed Y coordinate of the clicked target block face
      fz - The detailed Z coordinate of the clicked target block face
      player - The player that is placing the block. May be null.
      Returns:
      true if the block was properly place. The implementation is responsible for reverting any partial change.
    • getToolTier

      @PowerNukkitOnly public int getToolTier()
      Description copied from class: Block
      控制挖掘方块的最低工具级别(木质、石质...)
      Overrides:
      getToolTier in class Block
      Returns:
      挖掘方块的最低工具级别
    • toItem

      public Item toItem()
      Overrides:
      toItem in class Block
    • hasComparatorInputOverride

      public boolean hasComparatorInputOverride()
      Overrides:
      hasComparatorInputOverride in class Block
    • getComparatorInputOverride

      public int getComparatorInputOverride()
      Overrides:
      getComparatorInputOverride in class Block
    • canHarvestWithHand

      public boolean canHarvestWithHand()
      Overrides:
      canHarvestWithHand in class Block
    • isSolid

      @Since("1.3.0.0-PN") @PowerNukkitOnly public boolean isSolid(BlockFace side)
      Description copied from class: Block
      Check if blocks can be attached in the given side.
      Overrides:
      isSolid in class BlockSolidMeta
    • isTransparent

      @PowerNukkitDifference(since="1.4.0.0-PN", info="Will return true") public boolean isTransparent()
      Description copied from class: Block
      控制方块是否透明(默认为false)
      Overrides:
      isTransparent in class Block
      Returns:
      方块是否透明
    • getLightFilter

      @Since("1.4.0.0-PN") @PowerNukkitOnly public int getLightFilter()
      Description copied from class: Block
      控制方块吸收的光亮
      Overrides:
      getLightFilter in class Block
      Returns:
      方块吸收的光亮