public interface IChargerRegistry
Items to a specific charge rate when being placed inside a charger.
The registry is used in favor of an additional method for IAEItemPowerStorage with a fixed value per item.
This allows more flexibility for other charger like machines to choose their own values when needed.
There is no guarantee that this is charged per tick, it only represents the value per operation.
By default this is one charging operation every 10 ticks in case of an AE2 charger.| Modifier and Type | Method and Description |
|---|---|
void |
addChargeRate(net.minecraft.item.Item item,
double chargeRate)
Register a custom charge rate for a specific item.
|
double |
getChargeRate(net.minecraft.item.Item item)
Fetch a charge rate for a specific item.
|
void |
removeChargeRate(net.minecraft.item.Item item)
Remove the custom rate for a specific item.
|
@Nonnegative
double getChargeRate(@Nonnull
net.minecraft.item.Item item)
item - A Item implementing IAEItemPowerStorage.void addChargeRate(@Nonnull
net.minecraft.item.Item item,
@Nonnegative
double chargeRate)
item - A Item implementing IAEItemPowerStorage.chargeRate - the custom rate, must be > 0, capped to 16000dvoid removeChargeRate(@Nonnull
net.minecraft.item.Item item)
item - A Item implementing IAEItemPowerStorage.