Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/main/java/flaxbeard/immersivepetroleum/common/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public static class Refining
public static String[] towerByproduct = new String[]{
"immersivepetroleum:material, 1, 0, 7"
};
@Comment({"Output rate of the Distillation tower in mB/tick, default=80"})
public static int distillationTower_outputRate = 80
};
}

public static Generation generation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.google.common.collect.Lists;
import flaxbeard.immersivepetroleum.api.crafting.DistillationRecipe;
import flaxbeard.immersivepetroleum.common.blocks.multiblocks.MultiblockDistillationTower;
import flaxbeard.immersivepetroleum.common.Config;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
Expand Down Expand Up @@ -81,6 +82,7 @@ public void readCustomNBT(NBTTagCompound nbt, boolean descPacket)

private int cooldownTicks = 0;
private boolean operated = false;
private int outputRate = flaxbeard.immersivepetroleum.common.Config.distillationTower_outputRate;

@Override
public void writeCustomNBT(NBTTagCompound nbt, boolean descPacket)
Expand Down Expand Up @@ -212,7 +214,7 @@ else if (inventory.get(3).isEmpty())
lastFluidOut = null;
if (targetFluidStack != null)
{
FluidStack out = Utils.copyFluidStackWithAmount(targetFluidStack, Math.min(targetFluidStack.amount, 80), false);
FluidStack out = Utils.copyFluidStackWithAmount(targetFluidStack, Math.min(targetFluidStack.amount, outputRate), false);
int accepted = output.fill(out, false);
if (accepted > 0)
{
Expand All @@ -227,7 +229,7 @@ else if (inventory.get(3).isEmpty())
while (iterator.hasNext())
{
targetFluidStack = iterator.next();
out = Utils.copyFluidStackWithAmount(targetFluidStack, Math.min(targetFluidStack.amount, 80), false);
out = Utils.copyFluidStackWithAmount(targetFluidStack, Math.min(targetFluidStack.amount, outputRate), false);
accepted = output.fill(out, false);
if (accepted > 0)
{
Expand Down Expand Up @@ -667,4 +669,4 @@ public TileEntityDistillationTower getTileForPos(int targetPos)
TileEntity tile = world.getTileEntity(target);
return tile instanceof TileEntityDistillationTower ? (TileEntityDistillationTower) tile : null;
}
}
}