Fix all bugs, crafting task saving to disk done.
This commit is contained in:
@@ -4,8 +4,7 @@
|
||||
WIP
|
||||
|
||||
**TODO**
|
||||
- Saving crafting task state
|
||||
- Cancelling all crafting tasks
|
||||
- Crafter direction
|
||||
- Textures
|
||||
- Update wiki
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public class GuiCrafter extends GuiBase {
|
||||
if (crafter.getStackInSlot(i) != null) {
|
||||
ItemStack pattern = crafter.getStackInSlot(i);
|
||||
|
||||
String text = "Processing";
|
||||
String text = t("misc.refinedstorage:processing");
|
||||
|
||||
if (!ItemPattern.isProcessing(pattern)) {
|
||||
ItemStack result = ItemPattern.getOutputs(pattern)[0];
|
||||
@@ -66,7 +66,7 @@ public class GuiCrafter extends GuiBase {
|
||||
|
||||
float scale = 0.5f;
|
||||
GlStateManager.scale(scale, scale, 1);
|
||||
drawString(calculateOffsetOnScale(x + (ItemPattern.isProcessing(pattern) ? 0 : 20), scale), calculateOffsetOnScale(y + 6, scale), text);
|
||||
drawString(calculateOffsetOnScale(x + (ItemPattern.isProcessing(pattern) ? 5 : 20), scale), calculateOffsetOnScale(y + 6, scale), text);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@@ -520,10 +520,10 @@ public class TileController extends TileBase implements IEnergyReceiver, INetwor
|
||||
NBTTagCompound taskTag = taskList.getCompoundTagAt(i);
|
||||
|
||||
switch (taskTag.getInteger("Type")) {
|
||||
case 0:
|
||||
case BasicCraftingTask.ID:
|
||||
addCraftingTask(new BasicCraftingTask(taskTag));
|
||||
break;
|
||||
case 1:
|
||||
case ProcessingCraftingTask.ID:
|
||||
addCraftingTask(new ProcessingCraftingTask(taskTag));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ public class CraftingPattern {
|
||||
if (crafter == null) {
|
||||
crafter = (TileCrafter) world.getTileEntity(new BlockPos(crafterX, crafterY, crafterZ));
|
||||
}
|
||||
|
||||
return crafter;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import refinedstorage.tile.TileController;
|
||||
import refinedstorage.tile.autocrafting.CraftingPattern;
|
||||
import refinedstorage.util.NBTUtils;
|
||||
@@ -37,6 +38,12 @@ public class BasicCraftingTask implements ICraftingTask {
|
||||
this.satisfied = NBTUtils.readBoolArray(tag, NBT_SATISFIED);
|
||||
this.checked = NBTUtils.readBoolArray(tag, NBT_CHECKED);
|
||||
this.childTasks = NBTUtils.readBoolArray(tag, NBT_CHILD_TASKS);
|
||||
|
||||
NBTTagList tookList = tag.getTagList(NBT_TOOK, Constants.NBT.TAG_COMPOUND);
|
||||
|
||||
for (int i = 0; i < tookList.tagCount(); ++i) {
|
||||
itemsTook.add(ItemStack.loadItemStackFromNBT(tookList.getCompoundTagAt(i)));
|
||||
}
|
||||
}
|
||||
|
||||
public CraftingPattern getPattern() {
|
||||
|
||||
Reference in New Issue
Block a user