make the travel delay dynamically calculated
This commit is contained in:
parent
60ec37ee38
commit
0d84fa1e97
12 changed files with 3 additions and 13 deletions
|
@ -36,8 +36,6 @@ public final class GuiIds {
|
|||
|
||||
public static final int FILTERED_BUFFER = 60;
|
||||
|
||||
public static final int SCIENCE_BOOK = 70;
|
||||
|
||||
/**
|
||||
* Deactivate constructor
|
||||
*/
|
||||
|
|
|
@ -12,6 +12,7 @@ import java.util.BitSet;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import buildcraft.core.utils.MathUtils;
|
||||
import buildcraft.transport.pipes.PipeFluidsDiamond;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -176,7 +177,8 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler
|
|||
}
|
||||
|
||||
public void initFromPipe(Class<? extends Pipe> pipeClass) {
|
||||
flowRate = fluidCapacities.get(pipeClass);
|
||||
flowRate = fluidCapacities.get(pipeClass);
|
||||
travelDelay = MathUtils.clamp(Math.round(16 / (flowRate / 10)), 1, 12);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,7 +26,6 @@ public class PipeFluidsCobblestone extends Pipe<PipeTransportFluids> {
|
|||
public PipeFluidsCobblestone(Item item) {
|
||||
super(new PipeTransportFluids(), item);
|
||||
transport.initFromPipe(getClass());
|
||||
transport.travelDelay = 12;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -72,7 +72,6 @@ public class PipeFluidsDiamond extends Pipe<PipeTransportFluids> implements IDia
|
|||
super(new PipeTransportFluids(), item);
|
||||
|
||||
transport.initFromPipe(getClass());
|
||||
transport.travelDelay = 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -38,7 +38,6 @@ public class PipeFluidsEmerald extends PipeFluidsWood implements IClientState {
|
|||
solidIconIndex = PipeIconProvider.TYPE.PipeAllEmerald_Solid.ordinal();
|
||||
|
||||
transport.initFromPipe(getClass());
|
||||
transport.travelDelay = 4;
|
||||
}
|
||||
|
||||
public IInventory getFilters() {
|
||||
|
|
|
@ -27,7 +27,6 @@ public class PipeFluidsGold extends Pipe<PipeTransportFluids> {
|
|||
super(new PipeTransportFluids(), item);
|
||||
|
||||
transport.initFromPipe(getClass());
|
||||
transport.travelDelay = 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -52,7 +52,6 @@ public class PipeFluidsIron extends Pipe<PipeTransportFluids> {
|
|||
super(new PipeTransportFluids(), item);
|
||||
|
||||
transport.initFromPipe(getClass());
|
||||
transport.travelDelay = 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,7 +27,6 @@ public class PipeFluidsQuartz extends Pipe<PipeTransportFluids> {
|
|||
super(new PipeTransportFluids(), item);
|
||||
|
||||
transport.initFromPipe(getClass());
|
||||
transport.travelDelay = 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -32,7 +32,6 @@ public class PipeFluidsSandstone extends Pipe<PipeTransportFluids> implements IP
|
|||
super(new PipeTransportFluids(), item);
|
||||
|
||||
transport.initFromPipe(getClass());
|
||||
transport.travelDelay = 12;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,7 +27,6 @@ public class PipeFluidsStone extends Pipe<PipeTransportFluids> {
|
|||
super(new PipeTransportFluids(), item);
|
||||
|
||||
transport.initFromPipe(getClass());
|
||||
transport.travelDelay = 12;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -29,7 +29,6 @@ public class PipeFluidsVoid extends Pipe<PipeTransportFluids> implements IPipeTr
|
|||
super(new PipeTransportFluids(), item);
|
||||
|
||||
transport.initFromPipe(getClass());
|
||||
transport.travelDelay = 12;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -64,7 +64,6 @@ public class PipeFluidsWood extends Pipe<PipeTransportFluids> implements IEnergy
|
|||
super(new PipeTransportFluids(), item);
|
||||
|
||||
transport.initFromPipe(getClass());
|
||||
transport.travelDelay = 12;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue