storedEnergyHolder

@JvmName(name = "storedEnergyHolderBlockSide")
fun storedEnergyHolder(maxEnergy: Provider<Long>, allowedConnectionType: NetworkConnectionType, blockedSides: Set<BlockSide>, defaultConnectionConfig: () -> Map<BlockFace, NetworkConnectionType> = { CUBE_FACES.associateWithTo(enumMap()) { allowedConnectionType } }): DefaultEnergyHolder

Retrieves the EnergyHolder previously stored or creates a new one and registers it in the holders map.

The energy capacity is limited by the maxEnergy provider and the allowedConnectionType determines whether energy can be inserted, extracted, or both.

The blockedSides defines which sides of this tile-entity can never be used for energy transfer.

If the EnergyHolder is created for the first time, defaultConnectionConfig is used to determine the correct NetworkConnectionType for each side.


@JvmName(name = "storedEnergyHolderBlockFace")
fun storedEnergyHolder(maxEnergy: Provider<Long>, allowedConnectionType: NetworkConnectionType, blockedFaces: Set<BlockFace> = emptySet(), defaultConnectionConfig: () -> Map<BlockFace, NetworkConnectionType> = { CUBE_FACES.associateWithTo(enumMap()) { allowedConnectionType } }): DefaultEnergyHolder

Retrieves the EnergyHolder previously stored or creates a new one and registers it in the holders map.

The energy capacity is limited by the maxEnergy provider and the allowedConnectionType determines whether energy can be inserted, extracted, or both.

The blockedFaces define which faces of this tile-entity can never be used for energy transfer.

If the EnergyHolder is created for the first time, defaultConnectionConfig is used to determine the correct NetworkConnectionType for each side.