mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 10:34:40 +00:00
ec2 style output rule and oc integration
This commit is contained in:
1 parent
19f9dee682
commit
e38869f07d
20 files changed
+503
-25
No files matched your search
@@ -176,13 +176,13 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
|
||||
NBTTagCompound tag = Objects.requireNonNull(patternStack.getTagCompound());
|
||||
// may be possible to enter a partially-correct state if setInputs succeeds but setOutputs failed
|
||||
// but outside code should treat it as completely incorrect and not attempt to make calls
|
||||
return setInputs(readStackArray(tag.getTagList("in", Constants.NBT.TAG_COMPOUND), 16))
|
||||
&& setOutputs(readStackArray(tag.getTagList("out", Constants.NBT.TAG_COMPOUND), 4));
|
||||
return setInputs(readStackArray(tag.getTagList("in", Constants.NBT.TAG_COMPOUND)))
|
||||
&& setOutputs(readStackArray(tag.getTagList("out", Constants.NBT.TAG_COMPOUND)));
|
||||
}
|
||||
|
||||
public static IAEItemStack[] readStackArray(NBTTagList listTag, int maxCount) {
|
||||
public static IAEItemStack[] readStackArray(NBTTagList listTag) {
|
||||
// see note at top of class
|
||||
IAEItemStack[] stacks = new IAEItemStack[Math.min(listTag.tagCount(), maxCount)];
|
||||
IAEItemStack[] stacks = new IAEItemStack[listTag.tagCount()];
|
||||
for (int i = 0; i < stacks.length; i++) {
|
||||
stacks[i] = AEItemStack.loadItemStackFromNBT(listTag.getCompoundTagAt(i));
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ public final class ModAndClassUtil {
|
||||
public static boolean EC2 = false;
|
||||
public static boolean EIO = false;
|
||||
public static boolean FTR = false;
|
||||
public static boolean OC = false;
|
||||
|
||||
public static boolean isDoubleButton;
|
||||
public static boolean isSaveText;
|
||||
@@ -95,7 +96,8 @@ public final class ModAndClassUtil {
|
||||
EIO = true;
|
||||
if (Loader.isModLoaded("Forestry"))
|
||||
FTR = true;
|
||||
|
||||
if (Loader.isModLoaded("OpenComputers"))
|
||||
OC = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ public class NameConst {
|
||||
public static final String BLOCK_FLUID_PACKET_DECODER = "fluid_packet_decoder";
|
||||
public static final String BLOCK_FLUID_INTERFACE = "fluid_interface";
|
||||
public static final String BLOCK_INGREDIENT_BUFFER = "ingredient_buffer";
|
||||
public static final String BLOCK_OC_PATTERN_EDITOR = "oc_pattern_editor";
|
||||
|
||||
public static final String ITEM_FLUID_DROP = "fluid_drop";
|
||||
public static final String ITEM_FLUID_ENCODED_PATTERN = "fluid_encoded_pattern";
|
||||
@@ -37,5 +38,6 @@ public class NameConst {
|
||||
public static final String GUI_FLUID_PACKET_DECODER = GUI_KEY + BLOCK_FLUID_PACKET_DECODER;
|
||||
public static final String GUI_INGREDIENT_BUFFER = GUI_KEY + BLOCK_INGREDIENT_BUFFER;
|
||||
public static final String GUI_FLUID_INTERFACE = GUI_KEY + BLOCK_FLUID_INTERFACE;
|
||||
public static final String GUI_OC_PATTERN_EDITOR = GUI_KEY + BLOCK_OC_PATTERN_EDITOR;
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user