Cleanup, fixed a transporter bug

This commit is contained in:
Aidan C. Brady 2015-03-24 18:33:13 -04:00
parent 6c70dc100b
commit 0e51852baa
7 changed files with 5 additions and 7 deletions

View file

@ -204,7 +204,7 @@ public final class TransporterPathfinder
}
public static List<Destination> getPaths(ILogisticalTransporter start, TransporterStack stack, int min)
{
{
InventoryNetwork network = start.getTransmitterNetwork();
List<AcceptorData> acceptors = network.calculateAcceptors(stack.itemStack, stack.color);
List<Destination> paths = new ArrayList<Destination>();

View file

@ -286,10 +286,9 @@ public class TransporterStack
return false;
}
TileEntity from = Coord4D.get(tileEntity).getFromSide(side.getOpposite()).getTileEntity(tileEntity.getWorldObj());
ILogisticalTransporter transporter = (ILogisticalTransporter)tileEntity;
if(!transporter.canConnectMutual(side.getOpposite()))
if(!transporter.canConnectMutual(side))
{
return false;
}

View file

@ -407,7 +407,7 @@ public class PartLogisticalTransporter extends PartTransmitter<InventoryNetwork>
stack.originalLocation = original;
stack.homeLocation = original;
stack.color = color;
if((force && !canReceiveFrom(original.getTileEntity(world()), from)) || !stack.canInsertToTransporter(tile(), from))
{
return itemStack;

View file

@ -25,7 +25,6 @@ public class TileEntityAdvancedFactory extends TileEntityFactory
configComponent.addOutput(TransmissionType.ITEM, new SideData("Output", EnumColor.DARK_BLUE, new int[] {10, 11, 12, 13, 14}));
configComponent.setConfig(TransmissionType.ITEM, new byte[] {4, 3, 0, 2, 1, 0});
configComponent.addSupported(TransmissionType.GAS);
configComponent.addOutput(TransmissionType.GAS, new SideData("None", EnumColor.GREY, InventoryUtils.EMPTY));
configComponent.addOutput(TransmissionType.GAS, new SideData("Gas", EnumColor.DARK_RED, new int[] {0}));
configComponent.fillConfig(TransmissionType.GAS, 1);

View file

@ -147,10 +147,12 @@ public abstract class TileEntityChanceMachine<RECIPE extends ChanceMachineRecipe
public RECIPE getRecipe()
{
ItemStackInput input = getInput();
if(cachedRecipe == null || !input.testEquality(cachedRecipe.getInput()))
{
cachedRecipe = RecipeHandler.getChanceRecipe(input, getRecipes());
}
return cachedRecipe;
}

View file

@ -25,7 +25,6 @@ public class TileEntityEliteFactory extends TileEntityFactory
configComponent.addOutput(TransmissionType.ITEM, new SideData("Output", EnumColor.DARK_BLUE, new int[] {12, 13, 14, 15, 16, 17, 18}));
configComponent.setConfig(TransmissionType.ITEM, new byte[] {4, 3, 0, 2, 1, 0});
configComponent.addSupported(TransmissionType.GAS);
configComponent.addOutput(TransmissionType.GAS, new SideData("None", EnumColor.GREY, InventoryUtils.EMPTY));
configComponent.addOutput(TransmissionType.GAS, new SideData("Gas", EnumColor.DARK_RED, new int[] {0}));
configComponent.fillConfig(TransmissionType.GAS, 1);

View file

@ -132,7 +132,6 @@ public class TileEntityFactory extends TileEntityNoisyElectricBlock implements I
configComponent.addOutput(TransmissionType.ITEM, new SideData("Output", EnumColor.DARK_BLUE, new int[] {8, 9, 10}));
configComponent.setConfig(TransmissionType.ITEM, new byte[] {4, 3, 0, 2, 1, 0});
configComponent.addSupported(TransmissionType.GAS);
configComponent.addOutput(TransmissionType.GAS, new SideData("None", EnumColor.GREY, InventoryUtils.EMPTY));
configComponent.addOutput(TransmissionType.GAS, new SideData("Gas", EnumColor.DARK_RED, new int[] {0}));
configComponent.fillConfig(TransmissionType.GAS, 1);