Delay burst instantiation until we're sure we have enough mana. Closes #3133

This commit is contained in:
Vincent Lee committed 2020-01-22 19:14:33 -06:00
1 parent 830b87db40
commit 0d094a8bf6
1 file changed
+3 -3
@@ -496,8 +496,6 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
}
private EntityManaBurst getBurst(boolean fake) {
EntityManaBurst burst = new EntityManaBurst(this, fake);
boolean dreamwood = isDreamwood();
boolean ultra = isULTRA_SPREADER();
int maxMana = ultra ? 640 : dreamwood ? 240 : 160;
@@ -512,8 +510,10 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
if(!lens.isEmpty() && lens.getItem() instanceof ILensEffect)
((ILensEffect) lens.getItem()).apply(lens, props);
burst.setSourceLens(lens);
if(getCurrentMana() >= props.maxMana || fake) {
EntityManaBurst burst = new EntityManaBurst(this, fake);
burst.setSourceLens(lens);
if(mapmakerOverride) {
burst.setColor(mmForcedColor);
burst.setMana(mmForcedManaPayload);