Fix multi-item boosters displaying multiple times (#10297)

This commit is contained in:
MEEPofFaith
2025-02-04 14:38:01 -05:00
committed by GitHub
parent 3dd53fd66e
commit 939506ffae
5 changed files with 22 additions and 19 deletions
@@ -105,7 +105,7 @@ public class ForceProjector extends Block{
if(consItems && itemConsumer instanceof ConsumeItems coni){
stats.remove(Stat.booster);
stats.add(Stat.booster, StatValues.itemBoosters("+{0} " + StatUnit.shieldHealth.localized(), stats.timePeriod, phaseShieldBoost, phaseRadiusBoost, coni.items, this::consumesItem));
stats.add(Stat.booster, StatValues.itemBoosters("+{0} " + StatUnit.shieldHealth.localized(), stats.timePeriod, phaseShieldBoost, phaseRadiusBoost, coni.items));
stats.add(Stat.booster, StatValues.speedBoosters("", coolantConsumption, Float.MAX_VALUE, true, this::consumesLiquid));
}
}
@@ -59,7 +59,7 @@ public class MendProjector extends Block{
stats.add(Stat.booster, StatValues.itemBoosters(
"{0}" + StatUnit.timesSpeed.localized(),
stats.timePeriod, (phaseBoost + healPercent) / healPercent, phaseRangeBoost,
cons.items, this::consumesItem)
cons.items)
);
}
}
@@ -71,7 +71,7 @@ public class OverdriveProjector extends Block{
if(hasBoost && findConsumer(f -> f instanceof ConsumeItems) instanceof ConsumeItems items){
stats.remove(Stat.booster);
stats.add(Stat.booster, StatValues.itemBoosters("+{0}%", stats.timePeriod, speedBoostPhase * 100f, phaseRangeBoost, items.items, this::consumesItem));
stats.add(Stat.booster, StatValues.itemBoosters("+{0}%", stats.timePeriod, speedBoostPhase * 100f, phaseRangeBoost, items.items));
}
}
@@ -97,7 +97,7 @@ public class RegenProjector extends Block{
stats.add(Stat.booster, StatValues.itemBoosters(
"{0}" + StatUnit.timesSpeed.localized(),
stats.timePeriod, optionalMultiplier, 0f,
cons.items, this::consumesItem)
cons.items)
);
}
}