Added lesu logic. updated fmp to allow extra utils to run
This commit is contained in:
parent
afdbe69d18
commit
2ded7e0121
3 changed files with 20 additions and 4 deletions
|
@ -4,6 +4,7 @@ package techreborn.tiles.lesu;
|
|||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import techreborn.tiles.TileAesu;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class TileLesu extends TileAesu {
|
||||
|
@ -13,6 +14,7 @@ public class TileLesu extends TileAesu {
|
|||
|
||||
private ArrayList<LesuNetwork> countedNetworks = new ArrayList<LesuNetwork>();
|
||||
public int connectedBlocks = 0;
|
||||
public int currentBlocks = 0;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
@ -32,6 +34,18 @@ public class TileLesu extends TileAesu {
|
|||
}
|
||||
}
|
||||
}
|
||||
System.out.println(connectedBlocks);
|
||||
if(currentBlocks != connectedBlocks){
|
||||
try {
|
||||
Field field = getClass().getSuperclass().getSuperclass().getDeclaredField("maxStorage");
|
||||
field.setAccessible(true);
|
||||
field.set(this, (connectedBlocks * storgeBlockSize) + baseEU);
|
||||
currentBlocks = connectedBlocks;
|
||||
System.out.println("set output to " + maxStorage + " using " + connectedBlocks);
|
||||
} catch (NoSuchFieldException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue