mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 13:09:42 +00:00
Tweaks to mana spreader pool mana absorbing. Fixed spreaders pulling mana from pools before even being added to the network. Redstone spreaders can now pull mana from their target pool.
This commit is contained in:
1 parent
9bfef37e98
commit
60098d3ede
1 file changed
+6
-2
@@ -165,8 +165,12 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if(!ManaNetworkHandler.instance.isCollectorIn(this) && !isInvalid())
|
||||
boolean inNetwork = ManaNetworkHandler.instance.isCollectorIn(this);
|
||||
boolean wasInNetwork = inNetwork;
|
||||
if(!inNetwork && !isInvalid()) {
|
||||
ManaNetworkEvent.addCollector(this);
|
||||
inNetwork = true;
|
||||
}
|
||||
|
||||
boolean redstone = false;
|
||||
|
||||
@@ -174,7 +178,7 @@ 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;
|
||||
if(pool != receiver) {
|
||||
if(wasInNetwork && (pool != receiver || isRedstone())) {
|
||||
if(pool instanceof IKeyLocked && !((IKeyLocked) pool).getOutputKey().equals(getInputKey()))
|
||||
continue;
|
||||
|
||||
|
||||
Reference in new issue
Block a user