Small fixes

This commit is contained in:
Raoul Van den Berge
2016-10-25 21:16:47 +02:00
parent 82a0a364e7
commit 6afde5d818
2 changed files with 17 additions and 20 deletions

View File

@@ -293,8 +293,7 @@ public class CraftingTask implements ICraftingTask {
if (processable.getPattern().isProcessing()) {
for (ICraftingTask otherTask : network.getCraftingTasks()) {
for (ICraftingStep otherProcessable : otherTask.getSteps()) {
if (otherProcessable.getPattern().isProcessing()) {
if (otherProcessable != processable && !otherProcessable.hasReceivedOutputs() && otherProcessable.hasStartedProcessing() && otherProcessable.getPattern().getContainer().getFacingTile() != null) {
if (otherProcessable.getPattern().isProcessing() && otherProcessable != processable && !otherProcessable.hasReceivedOutputs() && otherProcessable.hasStartedProcessing() && otherProcessable.getPattern().getContainer().getFacingTile() != null) {
if (processable.getPattern().getContainer().getFacingTile().getPos().equals(otherProcessable.getPattern().getContainer().getFacingTile().getPos())) {
if (!arePatternsEqual(processable.getPattern(), otherProcessable.getPattern())) {
return false;
@@ -310,7 +309,6 @@ public class CraftingTask implements ICraftingTask {
}
}
}
}
return true;
}

View File

@@ -81,14 +81,13 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
protected void onContentsChanged(int slot) {
super.onContentsChanged(slot);
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER && slot < 6) {
RSUtils.constructFromDrive(getStackInSlot(slot), slot, itemStorages, fluidStorages, s -> new ItemStorage(s), s -> new FluidStorage(s));
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) {
RSUtils.constructFromDrive(getStackInSlot(slot), slot, itemStorages, fluidStorages, ItemStorage::new, FluidStorage::new);
}
}
@Override
public ItemStack extractItem(int slot, int amount, boolean simulate) {
if (slot < 6) {
if (itemStorages[slot] != null) {
itemStorages[slot].writeToNBT();
}
@@ -96,7 +95,7 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
if (fluidStorages[slot] != null) {
fluidStorages[slot].writeToNBT();
}
}
return super.extractItem(slot, amount, simulate);
}
};