Interface BlockType

    • Method Detail

      • item

        java.util.Optional<ItemType> item()
        Return the ItemType that represents this block.
        Returns:
        The item type or Optional.empty() otherwise
      • doesUpdateRandomly

        boolean doesUpdateRandomly()
        Gets if this BlockType is set to receive random block ticks.

        Random block updates are most commonly used for growth of plants.

        Returns:
        If the BlockType updates randomly
      • setUpdateRandomly

        void setUpdateRandomly​(boolean updateRandomly)
        Sets if the BlockType should receive random block updates.

        Random block updates are most commonly used for growth of plants.

        Parameters:
        updateRandomly - If the BlockType should update randomly
      • isAnyOf

        boolean isAnyOf​(java.util.function.Supplier<? extends BlockType>... types)
        Returns true if this type is any of the given block types
        Parameters:
        types - the block types to check
        Returns:
        true if this type is any of the given block types
      • isAnyOf

        boolean isAnyOf​(BlockType... types)
        Returns true if this type is any of the given block types
        Parameters:
        types - the block types to check
        Returns:
        true if this type is any of the given block types