Fixed lesu issue, temp remove rf output
This commit is contained in:
parent
10846270c5
commit
ab384b661a
6 changed files with 55 additions and 28 deletions
|
@ -20,6 +20,7 @@ public class LesuNetwork {
|
|||
}
|
||||
|
||||
private void rebuild(){
|
||||
master = null;
|
||||
for(TileLesuStorage lesuStorage : storages){
|
||||
lesuStorage.findAndJoinNetwork(lesuStorage.getWorldObj(), lesuStorage.xCoord, lesuStorage.yCoord, lesuStorage.zCoord);
|
||||
}
|
||||
|
@ -33,6 +34,9 @@ public class LesuNetwork {
|
|||
for(TileLesuStorage lesuStorage : tileLesuStorages){
|
||||
lesuStorage.setNetwork(this);
|
||||
}
|
||||
if(network.master != null && this.master == null){
|
||||
this.master = network.master;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,9 +49,4 @@ public class LesuNetwork {
|
|||
storages.clear();
|
||||
}
|
||||
|
||||
|
||||
public void printInfo(){
|
||||
System.out.println(storages.size());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package techreborn.tiles.lesu;
|
|||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.lib.Functions;
|
||||
import techreborn.powerSystem.TilePowerAcceptor;
|
||||
import techreborn.util.Inventory;
|
||||
|
||||
|
@ -91,7 +92,7 @@ public class TileLesu extends TilePowerAcceptor {//TODO wrench
|
|||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
return direction.ordinal() == blockMetadata;
|
||||
return Functions.getIntDirFromDirection(direction) == blockMetadata;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -14,7 +14,9 @@ public class TileLesuStorage extends TileMachineBase {
|
|||
if(network == null){
|
||||
findAndJoinNetwork(worldObj, xCoord, yCoord, zCoord);
|
||||
} else {
|
||||
//network.printInfo();
|
||||
if(network.master != null && network.master.getWorldObj().getTileEntity(network.master.xCoord, network.master.yCoord, network.master.zCoord) != network.master){
|
||||
network.master = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue