Package appeng.api.networking.energy
Interface IEnergyGridProvider
- All Superinterfaces:
IGridNodeService
internal use only.
-
Method Summary
Modifier and TypeMethodDescriptiondoubleextractProviderPower(double amt, Actionable mode) internal use only Extracts the requested amount from the provider.doublegetProviderEnergyDemand(double d) internal use only Returns the current demand of an provider.doubleinternal use only AE currently uses this to enqueue the next visited provider.doubleinternal use only AE currently uses this to enqueue the next visited provider.doubleinjectProviderPower(double amt, Actionable mode) Injects the offered amount into the provider.internal use only Can return a list of providers behind the current.
-
Method Details
-
providers
Collection<IEnergyGridProvider> providers()internal use only Can return a list of providers behind the current. An example would be something acting as proxy between differentIEnergyServices. This can contain duplicate entries, AE will ensure that each provider is only visited once. internal use only -
extractProviderPower
internal use only Extracts the requested amount from the provider. This should never forward a call to anotherIEnergyGridProvider, instead return them viaproviders()- Returns:
- the used amount
-
injectProviderPower
Injects the offered amount into the provider. This should never forward a call to anotherIEnergyGridProvider, instead return them viaproviders()internal use only- Returns:
- the leftover amount
-
getProviderEnergyDemand
double getProviderEnergyDemand(double d) internal use only Returns the current demand of an provider. This should never forward a call to anotherIEnergyGridProvider, instead return them viaproviders()- Parameters:
d- the max amount offered, the demand should never exceed it.- Returns:
- the total amount demanded
-
getProviderStoredEnergy
double getProviderStoredEnergy()internal use only AE currently uses this to enqueue the next visited provider. There is no guarantee that this works on in a perfect way. It can be limited to the returns of the pastproviders(), but not any future one discovered by visiting further providers. E.g. inject into the the lowest one first or extract from the highest one.- Returns:
- the current stored amount.
-
getProviderMaxEnergy
double getProviderMaxEnergy()internal use only AE currently uses this to enqueue the next visited provider. There is no guarantee that this works on in a perfect way. It can be limited to the returns of the pastproviders(), but not any future one discovered by visiting further providers. E.g. inject into the the lowest one first or extract from the highest one.- Returns:
- the maximum amount stored.
-