mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 19:59:36 +00:00
Mana Spreaders will no longer fire into the pool they're bound to. Closes #67
This commit is contained in:
1 parent
4412430959
commit
c211ace28b
1 file changed
+8
-6
@@ -118,12 +118,14 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
TileEntity tileAt = worldObj.getTileEntity(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ);
|
||||
if(tileAt instanceof IManaPool) {
|
||||
IManaPool pool = (IManaPool) tileAt;
|
||||
int manaInPool = pool.getCurrentMana();
|
||||
if(manaInPool > 0 && !isFull()) {
|
||||
int manaMissing = MAX_MANA - mana;
|
||||
int manaToRemove = Math.min(manaInPool, manaMissing);
|
||||
pool.recieveMana(-manaToRemove);
|
||||
recieveMana(manaToRemove);
|
||||
if(pool != receiver) {
|
||||
int manaInPool = pool.getCurrentMana();
|
||||
if(manaInPool > 0 && !isFull()) {
|
||||
int manaMissing = MAX_MANA - mana;
|
||||
int manaToRemove = Math.min(manaInPool, manaMissing);
|
||||
pool.recieveMana(-manaToRemove);
|
||||
recieveMana(manaToRemove);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user