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

View File

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