mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-26 05:08:34 +01:00
made the projectile generator not waste additional aura
This commit is contained in:
parent
f7138175fb
commit
615fbe3f88
1 changed files with 4 additions and 2 deletions
|
@ -61,8 +61,10 @@ public class BlockProjectileGenerator extends BlockContainerImpl implements ITES
|
||||||
if (!generator.canGenerateRightNow(35, amount))
|
if (!generator.canGenerateRightNow(35, amount))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
while (amount > 0) {
|
||||||
BlockPos spot = IAuraChunk.getLowestSpot(entity.world, pos, 35, pos);
|
BlockPos spot = IAuraChunk.getLowestSpot(entity.world, pos, 35, pos);
|
||||||
IAuraChunk.getAuraChunk(entity.world, spot).storeAura(spot, amount);
|
amount -= IAuraChunk.getAuraChunk(entity.world, spot).storeAura(spot, amount);
|
||||||
|
}
|
||||||
|
|
||||||
PacketHandler.sendToAllAround(entity.world, pos, 32,
|
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()));
|
new PacketParticles((float) entity.getPosX(), (float) entity.getPosY(), (float) entity.getPosZ(), PacketParticles.Type.PROJECTILE_GEN, pos.getX(), pos.getY(), pos.getZ()));
|
||||||
|
|
Loading…
Reference in a new issue