Fix super conductor output on aesu's
This commit is contained in:
parent
1d78c60e51
commit
fc277000b8
2 changed files with 28 additions and 2 deletions
|
@ -34,6 +34,7 @@ import net.minecraft.util.text.TextFormatting;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import reborncore.api.tile.IUpgrade;
|
||||
import reborncore.api.tile.IUpgradeable;
|
||||
import reborncore.common.powerSystem.TilePowerAcceptor;
|
||||
|
@ -149,8 +150,11 @@ public class ItemUpgrades extends ItemTR implements IUpgrade {
|
|||
@Nullable
|
||||
World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
|
||||
if(stack.getItemDamage() == 3){
|
||||
tooltip.add(TextFormatting.LIGHT_PURPLE + "Increases the max output of the AESU");
|
||||
tooltip.add(TextFormatting.GOLD + "Blame obstinate_3 for this");
|
||||
tooltip.add(TextFormatting.LIGHT_PURPLE + "Increases the max transfer of the Adjustable SU");
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)){
|
||||
tooltip.add(TextFormatting.GOLD + "Blame obstinate_3 for this");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -72,6 +72,9 @@ public class TileAdjustableSU extends TileEnergyStorage implements IContainerPro
|
|||
if (OUTPUT > getMaxConfigOutput()) {
|
||||
OUTPUT = getMaxConfigOutput();
|
||||
}
|
||||
if(world.getTotalWorldTime() % 20 == 0){
|
||||
checkTeir();
|
||||
}
|
||||
}
|
||||
|
||||
public int getMaxConfigOutput(){
|
||||
|
@ -138,6 +141,25 @@ public class TileAdjustableSU extends TileEnergyStorage implements IContainerPro
|
|||
return OUTPUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxOutput() {
|
||||
return OUTPUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getBaseMaxInput() {
|
||||
//If we have super conductors increase the max input of the machine
|
||||
if(getMaxConfigOutput() > maxOutput){
|
||||
return getMaxConfigOutput();
|
||||
}
|
||||
return maxInput;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPowerTier getBaseTier() {
|
||||
return null;
|
||||
}
|
||||
|
||||
// TilePowerAcceptor
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound tagCompound) {
|
||||
|
|
Loading…
Add table
Reference in a new issue