Bedrock Energistics Core
    Preparing search index...

    Class IoCapabilitiesBeta

    Represents the input/output capabilities of a machine side or item machine.

    Index
    acceptsAny: boolean

    Does this object accept any type or category?

    isConduit: boolean = false

    Is this object a conduit?

    onlyAllowsConduitConnections: boolean = false

    Does this object only accept connections from conduits?

    This is true for machines when they have the 'fluffyalien_energisticscore:require_conduit_connection' tag.

    • Beta

      Check if this object accepts any storage type of the given category, implicitly or explicitly.

      Parameters

      • category: string

        The category to check.

      • isFromConduit: boolean = false

        Is the source a conduit?

      Returns Promise<boolean>

      Whether this object accepts any storage type of the given category.

      This returns true if any of the following conditions are true:

      • IoCapabilities.acceptsAny is true.
      • Accepted categories includes the given category.
      • Any accepted type is of the given category.

      Throws a PublicError of type PublicErrorType.InvalidState if this package has not been initialized (see init).

    • Beta

      Check if this object accepts the given category, implicitly or explicitly.

      Parameters

      • category: string

        The category to check.

      • isFromConduit: boolean = false

        Is the source a conduit?

      Returns boolean

      Whether this object accepts the given category.

      This returns true if any of the following conditions are true:

    • Beta

      Check if this object accepts the given storage type data, implicitly or explicitly. Use IoCapabilities.acceptsTypeId to check by ID.

      Parameters

      • storageType: StorageTypeData

        The storage type data to check.

      • isFromConduit: boolean = false

        Is the source a conduit?

      Returns boolean

      Whether this object accepts the given storage type.

      This returns true if any of the following conditions are true:

      • IoCapabilities.acceptsAny is true.
      • Accepted categories includes the category of the storage type.
      • Accepted types includes the storage type.
    • Beta

      Get a storage type by it's ID and check if this object accepts it, implicitly or explicitly.

      Parameters

      • id: string

        The ID of the storage type.

      • isFromConduit: boolean = false

        Is the source a conduit?

      Returns Promise<boolean>

      Whether this object accepts the storage type with the given ID.

      This returns true if any of the following conditions are true:

      • IoCapabilities.acceptsAny is true.
      • Accepted categories includes the category of the storage type.
      • Accepted types includes the storage type.

      Throws a PublicError of type PublicErrorType.InvalidState if this package has not been initialized (see init).

    • Beta

      Check if this object accepts the given storage type explicitly or accepts any.

      Parameters

      • id: string

        The ID of the storage type.

      • isFromConduit: boolean = false

        Is the source a conduit?

      Returns boolean

      Whether this object accepts the storage type with the given ID.

      This returns true if any of the following conditions are true:

    • Beta

      Get the input/output capabilities of a block.

      Parameters

      • block: Block

        The block.

      • side: Direction | "network_link"

        The side of the machine to check or "network_link" for linked connections.

      Returns IoCapabilities

      A new IoCapabilities object.