Fix the LESU not working
This commit is contained in:
parent
de4c14542b
commit
2fc9557516
1 changed files with 6 additions and 3 deletions
|
@ -60,10 +60,9 @@ public class LapotronicSUBlockEntity extends EnergyStorageBlockEntity implements
|
||||||
countedNetworks.clear();
|
countedNetworks.clear();
|
||||||
connectedBlocks = 0;
|
connectedBlocks = 0;
|
||||||
for (Direction dir : Direction.values()) {
|
for (Direction dir : Direction.values()) {
|
||||||
BlockPos adjucentBlockPos = new BlockPos(pos.getX() + dir.getOffsetX(),
|
BlockPos adjucentBlockPos = getPos().offset(dir);
|
||||||
pos.getY() + dir.getOffsetX(), pos.getZ() + dir.getOffsetX());
|
|
||||||
BlockEntity adjucent = world.getBlockEntity(adjucentBlockPos);
|
BlockEntity adjucent = world.getBlockEntity(adjucentBlockPos);
|
||||||
if (adjucent == null || !(adjucent instanceof LSUStorageBlockEntity)) {
|
if (!(adjucent instanceof LSUStorageBlockEntity)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (((LSUStorageBlockEntity) adjucent).network == null) {
|
if (((LSUStorageBlockEntity) adjucent).network == null) {
|
||||||
|
@ -82,6 +81,10 @@ public class LapotronicSUBlockEntity extends EnergyStorageBlockEntity implements
|
||||||
}
|
}
|
||||||
setMaxStorage();
|
setMaxStorage();
|
||||||
maxOutput = (connectedBlocks * TechRebornConfig.lesuExtraIOPerBlock) + TechRebornConfig.lesuBaseOutput;
|
maxOutput = (connectedBlocks * TechRebornConfig.lesuExtraIOPerBlock) + TechRebornConfig.lesuBaseOutput;
|
||||||
|
|
||||||
|
if (getEnergy() > getMaxStoredPower()) {
|
||||||
|
setEnergy(getMaxStoredPower());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue