Interface CreakingHeart

All Superinterfaces:
BlockState, Metadatable, PersistentDataHolder, PersistentDataViewHolder, TileState

@NullMarked public interface CreakingHeart extends TileState
Represents a captured state of a creaking heart.
  • Method Details

    • getCreaking

      @Nullable Creaking getCreaking()
      Gets the creaking protecting this creaking heart.
      Returns:
      the creaking, or null if this creaking heart doesn't have a protector.
    • setCreaking

      void setCreaking(@Nullable Creaking creaking)
      Sets the creaking protecting this creaking heart.
      Parameters:
      creaking - the creaking, or null to remove any existing creaking.
      Throws:
      IllegalArgumentException - if the creaking is in another world.
      IllegalStateException - if this block state is not placed.
    • spawnCreaking

      @Nullable Creaking spawnCreaking()
      Attempts to spawn a creaking to protect this creaking heart.
      Returns:
      the Creaking that was spawned to protect this heart, or null if it failed.
      Throws:
      IllegalStateException - if this block state is not placed.
    • spreadResin

      @Nullable Location spreadResin()
      Attempts to spread resin to adjacent blocks.
      Returns:
      the location resin was spread to, or null if it failed to spread.
      Throws:
      IllegalStateException - if this block state is not placed.
      API Note:
      This method triggers events related to a block being modified.