Package mindustry.world.consumers
Class ConsumeItemExplode
java.lang.Object
mindustry.world.consumers.Consume
mindustry.world.consumers.ConsumeItemFilter
mindustry.world.consumers.ConsumeItemExplode
Causes a block to explode when explosive items are moved into it.
-
Field Summary
Modifier and TypeFieldDescriptionfloat
float
float
Fields inherited from class mindustry.world.consumers.ConsumeItemFilter
filter
Fields inherited from class mindustry.world.consumers.Consume
booster, multiplier, optional, update
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Apply extra filters to a block.void
void
float
efficiency
(mindustry.gen.Building build) void
trigger
(mindustry.gen.Building build) Called when a consumption is triggered manually.void
update
(mindustry.gen.Building build) Methods inherited from class mindustry.world.consumers.ConsumeItemFilter
getConsumed
-
Field Details
-
damage
public float damage -
threshold
public float threshold -
baseChance
public float baseChance -
explodeEffect
-
-
Constructor Details
-
ConsumeItemExplode
public ConsumeItemExplode(float threshold) -
ConsumeItemExplode
public ConsumeItemExplode()
-
-
Method Details
-
update
public void update(mindustry.gen.Building build) - Overrides:
update
in classConsumeItemFilter
-
build
- Overrides:
build
in classConsumeItemFilter
-
trigger
public void trigger(mindustry.gen.Building build) Description copied from class:Consume
Called when a consumption is triggered manually.- Overrides:
trigger
in classConsumeItemFilter
-
display
- Overrides:
display
in classConsumeItemFilter
-
apply
Description copied from class:Consume
Apply extra filters to a block.- Overrides:
apply
in classConsumeItemFilter
-
efficiency
public float efficiency(mindustry.gen.Building build) - Overrides:
efficiency
in classConsumeItemFilter
- Returns:
- [0, 1] efficiency multiplier based on input. Returns 0 if not valid in subclasses. Should return fraction if needs are partially met.
-