Fix issue #31
This commit is contained in:
@@ -232,7 +232,7 @@ public class RefinedStorageUtils {
|
||||
return upgrades;
|
||||
}
|
||||
|
||||
public static void writeBoolArray(NBTTagCompound tag, String name, boolean[] array) {
|
||||
public static void writeBooleanArray(NBTTagCompound tag, String name, boolean[] array) {
|
||||
int[] intArray = new int[array.length];
|
||||
|
||||
for (int i = 0; i < intArray.length; ++i) {
|
||||
@@ -242,7 +242,7 @@ public class RefinedStorageUtils {
|
||||
tag.setTag(name, new NBTTagIntArray(intArray));
|
||||
}
|
||||
|
||||
public static boolean[] readBoolArray(NBTTagCompound tag, String name) {
|
||||
public static boolean[] readBooleanArray(NBTTagCompound tag, String name) {
|
||||
int[] intArray = tag.getIntArray(name);
|
||||
|
||||
boolean array[] = new boolean[intArray.length];
|
||||
|
@@ -7,6 +7,7 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import refinedstorage.RefinedStorageUtils;
|
||||
import refinedstorage.container.ContainerConstructor;
|
||||
@@ -42,6 +43,7 @@ public class TileConstructor extends TileMachine implements ICompareConfig {
|
||||
|
||||
if (took != null) {
|
||||
worldObj.setBlockState(front, block.getStateFromMeta(took.getItemDamage()), 1 | 2);
|
||||
worldObj.playSound(null, front, block.getStepSound().getPlaceSound(), SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
} else if (RefinedStorageUtils.hasUpgrade(upgradesInventory, ItemUpgrade.TYPE_CRAFTING)) {
|
||||
CraftingPattern pattern = controller.getPattern(inventory.getStackInSlot(0), compare);
|
||||
|
||||
|
@@ -35,9 +35,9 @@ public class BasicCraftingTask implements ICraftingTask {
|
||||
|
||||
public BasicCraftingTask(NBTTagCompound tag) {
|
||||
this.pattern = CraftingPattern.readFromNBT(tag.getCompoundTag(CraftingPattern.NBT));
|
||||
this.satisfied = RefinedStorageUtils.readBoolArray(tag, NBT_SATISFIED);
|
||||
this.checked = RefinedStorageUtils.readBoolArray(tag, NBT_CHECKED);
|
||||
this.childTasks = RefinedStorageUtils.readBoolArray(tag, NBT_CHILD_TASKS);
|
||||
this.satisfied = RefinedStorageUtils.readBooleanArray(tag, NBT_SATISFIED);
|
||||
this.checked = RefinedStorageUtils.readBooleanArray(tag, NBT_CHECKED);
|
||||
this.childTasks = RefinedStorageUtils.readBooleanArray(tag, NBT_CHILD_TASKS);
|
||||
|
||||
NBTTagList tookList = tag.getTagList(NBT_TOOK, Constants.NBT.TAG_COMPOUND);
|
||||
|
||||
@@ -106,9 +106,9 @@ public class BasicCraftingTask implements ICraftingTask {
|
||||
pattern.writeToNBT(patternTag);
|
||||
tag.setTag(CraftingPattern.NBT, patternTag);
|
||||
|
||||
RefinedStorageUtils.writeBoolArray(tag, NBT_SATISFIED, satisfied);
|
||||
RefinedStorageUtils.writeBoolArray(tag, NBT_CHECKED, checked);
|
||||
RefinedStorageUtils.writeBoolArray(tag, NBT_CHILD_TASKS, childTasks);
|
||||
RefinedStorageUtils.writeBooleanArray(tag, NBT_SATISFIED, satisfied);
|
||||
RefinedStorageUtils.writeBooleanArray(tag, NBT_CHECKED, checked);
|
||||
RefinedStorageUtils.writeBooleanArray(tag, NBT_CHILD_TASKS, childTasks);
|
||||
|
||||
NBTTagList tookList = new NBTTagList();
|
||||
|
||||
|
@@ -32,9 +32,9 @@ public class ProcessingCraftingTask implements ICraftingTask {
|
||||
|
||||
public ProcessingCraftingTask(NBTTagCompound tag) {
|
||||
this.pattern = CraftingPattern.readFromNBT(tag.getCompoundTag(CraftingPattern.NBT));
|
||||
this.inserted = RefinedStorageUtils.readBoolArray(tag, NBT_INSERTED);
|
||||
this.missing = RefinedStorageUtils.readBoolArray(tag, NBT_MISSING);
|
||||
this.satisfied = RefinedStorageUtils.readBoolArray(tag, NBT_SATISFIED);
|
||||
this.inserted = RefinedStorageUtils.readBooleanArray(tag, NBT_INSERTED);
|
||||
this.missing = RefinedStorageUtils.readBooleanArray(tag, NBT_MISSING);
|
||||
this.satisfied = RefinedStorageUtils.readBooleanArray(tag, NBT_SATISFIED);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -109,9 +109,9 @@ public class ProcessingCraftingTask implements ICraftingTask {
|
||||
pattern.writeToNBT(patternTag);
|
||||
tag.setTag(CraftingPattern.NBT, patternTag);
|
||||
|
||||
RefinedStorageUtils.writeBoolArray(tag, NBT_INSERTED, satisfied);
|
||||
RefinedStorageUtils.writeBoolArray(tag, NBT_MISSING, missing);
|
||||
RefinedStorageUtils.writeBoolArray(tag, NBT_SATISFIED, satisfied);
|
||||
RefinedStorageUtils.writeBooleanArray(tag, NBT_INSERTED, satisfied);
|
||||
RefinedStorageUtils.writeBooleanArray(tag, NBT_MISSING, missing);
|
||||
RefinedStorageUtils.writeBooleanArray(tag, NBT_SATISFIED, satisfied);
|
||||
|
||||
tag.setInteger("Type", ID);
|
||||
}
|
||||
|
Reference in New Issue
Block a user