Package mindustry.world.consumers
Class ConsumePowerDynamic
java.lang.Object
mindustry.world.consumers.Consume
mindustry.world.consumers.ConsumePower
mindustry.world.consumers.ConsumePowerDynamic
A power consumer that uses a dynamic amount of power.
-
Field Summary
Fields inherited from class mindustry.world.consumers.ConsumePower
buffered, capacityFields inherited from class mindustry.world.consumers.Consume
booster, multiplier, optional, update -
Constructor Summary
ConstructorsConstructorDescriptionConsumePowerDynamic(float displayed, arc.func.Floatf<mindustry.gen.Building> usage) ConsumePowerDynamic(arc.func.Floatf<mindustry.gen.Building> usage) -
Method Summary
Modifier and TypeMethodDescriptionvoidfloatrequestedPower(mindustry.gen.Building entity) Retrieves the amount of power which is requested for the given block and entity.Methods inherited from class mindustry.world.consumers.ConsumePower
apply, efficiency, ignore
-
Constructor Details
-
ConsumePowerDynamic
public ConsumePowerDynamic(arc.func.Floatf<mindustry.gen.Building> usage) -
ConsumePowerDynamic
public ConsumePowerDynamic(float displayed, arc.func.Floatf<mindustry.gen.Building> usage)
-
-
Method Details
-
requestedPower
public float requestedPower(mindustry.gen.Building entity) Description copied from class:ConsumePowerRetrieves the amount of power which is requested for the given block and entity.- Overrides:
requestedPowerin classConsumePower- Parameters:
entity- The entity which contains the power module.- Returns:
- The amount of power which is requested per tick.
-
display
- Overrides:
displayin classConsumePower
-