bugfixes to fluid pipes
This commit is contained in:
parent
50c2cf0f99
commit
2d5e1e1f7c
3 changed files with 5 additions and 10 deletions
|
@ -185,7 +185,7 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler,
|
|||
public void initFromPipe(Class<? extends Pipe> pipeClass) {
|
||||
capacity = 25 * Math.min(1000, BuildCraftTransport.pipeFluidsBaseFlowRate);
|
||||
flowRate = fluidCapacities.get(pipeClass);
|
||||
travelDelay = MathUtils.clamp(Math.round(16F / (flowRate / 10)), 1, MAX_TRAVEL_DELAY);
|
||||
travelDelay = MathUtils.clamp(Math.round(16F / (flowRate / BuildCraftTransport.pipeFluidsBaseFlowRate)), 1, MAX_TRAVEL_DELAY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -276,9 +276,10 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler,
|
|||
|
||||
if (liquidToPush.amount > 0) {
|
||||
int filled = ((IFluidHandler) target).fill(o.getOpposite(), liquidToPush, true);
|
||||
section.drain(filled, true);
|
||||
if (filled <= 0) {
|
||||
outputTTL[o.ordinal()]--;
|
||||
} else {
|
||||
section.drain(filled, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -366,12 +367,6 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler,
|
|||
|
||||
if (outputCooldown[i] > 0) {
|
||||
outputCooldown[i]--;
|
||||
} else {
|
||||
if (outputTTL[i] > 0) {
|
||||
outputTTL[i]--;
|
||||
} else {
|
||||
transferState[i] = TransferState.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -428,7 +428,7 @@ public class TileGenericPipe extends TileEntity implements IFluidHandler,
|
|||
for (Object o : world.playerEntities) {
|
||||
EntityPlayerMP player = (EntityPlayerMP) o;
|
||||
|
||||
if (world.getPlayerManager().isPlayerWatchingChunk (player, xCoord >> 4, zCoord >> 4)) {
|
||||
if (world.getPlayerManager().isPlayerWatchingChunk(player, xCoord >> 4, zCoord >> 4)) {
|
||||
BuildCraftCore.instance.sendToPlayer(player, updatePacket);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ public class AdvancedFacadeRecipe extends IntegrationRecipeBC {
|
|||
additionalState = ItemFacade.FacadeState.createTransparent(wire);
|
||||
} else {
|
||||
additionalState = ItemFacade.getFacadeStates(facade)[0];
|
||||
additionalState = ItemFacade.FacadeState.create(additionalState.block, additionalState.metadata, wire);
|
||||
additionalState = new ItemFacade.FacadeState(additionalState.block, additionalState.metadata, wire, additionalState.hollow);
|
||||
}
|
||||
|
||||
// if in states array exists state with the same wire just override it
|
||||
|
|
Loading…
Reference in a new issue