made the projectile generator not waste additional aura

This commit is contained in:
Ellpeck 2020-01-29 21:19:00 +01:00
parent f7138175fb
commit 615fbe3f88

View file

@ -61,8 +61,10 @@ public class BlockProjectileGenerator extends BlockContainerImpl implements ITES
if (!generator.canGenerateRightNow(35, amount))
return;
BlockPos spot = IAuraChunk.getLowestSpot(entity.world, pos, 35, pos);
IAuraChunk.getAuraChunk(entity.world, spot).storeAura(spot, amount);
while (amount > 0) {
BlockPos spot = IAuraChunk.getLowestSpot(entity.world, pos, 35, pos);
amount -= IAuraChunk.getAuraChunk(entity.world, spot).storeAura(spot, amount);
}
PacketHandler.sendToAllAround(entity.world, pos, 32,
new PacketParticles((float) entity.getPosX(), (float) entity.getPosY(), (float) entity.getPosZ(), PacketParticles.Type.PROJECTILE_GEN, pos.getX(), pos.getY(), pos.getZ()));