Possible crash fix
This commit is contained in:
@@ -68,9 +68,9 @@ public class OverdriveProjector extends Block{
|
||||
stats.add(Stat.range, range / tilesize, StatUnit.blocks);
|
||||
stats.add(Stat.productionTime, useTime / 60f, StatUnit.seconds);
|
||||
|
||||
if(hasBoost){
|
||||
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, ((ConsumeItems)findConsumer(f -> f instanceof ConsumeItems)).items, this::consumesItem));
|
||||
stats.add(Stat.booster, StatValues.itemBoosters("+{0}%", stats.timePeriod, speedBoostPhase * 100f, phaseRangeBoost, items.items, this::consumesItem));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user