Small fixes
This commit is contained in:
@@ -293,16 +293,14 @@ 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;
|
} else {
|
||||||
} else {
|
for (ItemStack toInsert : processable.getToInsert()) {
|
||||||
for (ItemStack toInsert : processable.getToInsert()) {
|
if (ItemHandlerHelper.insertItem(processable.getPattern().getContainer().getFacingInventory(), toInsert, true) != null) {
|
||||||
if (ItemHandlerHelper.insertItem(processable.getPattern().getContainer().getFacingInventory(), toInsert, true) != null) {
|
return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,22 +81,21 @@ 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();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fluidStorages[slot] != null) {
|
|
||||||
fluidStorages[slot].writeToNBT();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fluidStorages[slot] != null) {
|
||||||
|
fluidStorages[slot].writeToNBT();
|
||||||
|
}
|
||||||
|
|
||||||
return super.extractItem(slot, amount, simulate);
|
return super.extractItem(slot, amount, simulate);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user