bugfixes to fluid pipes

This commit is contained in:
Adrian 2015-07-14 17:35:08 +02:00
parent 31014697b4
commit 9087bd2f3b
3 changed files with 5 additions and 10 deletions

View file

@ -181,7 +181,7 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler
public void initFromPipe(Class<? extends Pipe> pipeClass) {
capacity = LIQUID_IN_PIPE;
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
@ -272,9 +272,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);
}
}
}
@ -362,12 +363,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;
}
}
}
}

View file

@ -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);
}
}

View file

@ -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