mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-11 15:57:55 +00:00
Read NBT tags combine and beSubstitute from ItemStack when converting them to FluidPattern (#268)
This commit is contained in:
1 parent
e88af75f40
commit
d78618d950
2 files changed
+4
No files matched your search
+1
@@ -271,6 +271,7 @@ public abstract class FCContainerEncodeTerminal extends ContainerItemMonitor
|
||||
pattern.setInputs(collectInventory(this.craftingSlots));
|
||||
pattern.setOutputs(collectInventory(this.outputSlots));
|
||||
pattern.setCanBeSubstitute(this.beSubstitute ? 1 : 0);
|
||||
pattern.setCombine(this.combine ? 1 : 0);
|
||||
patternSlotOUT.putStack(stampAuthor(pattern.writeToStack()));
|
||||
}
|
||||
|
||||
|
||||
@@ -187,6 +187,9 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
|
||||
return false;
|
||||
}
|
||||
NBTTagCompound tag = Objects.requireNonNull(patternStack.getTagCompound());
|
||||
setCanBeSubstitute(tag.getBoolean("beSubstitute") ? 1 : 0);
|
||||
setCombine(tag.getInteger("combine"));
|
||||
|
||||
// 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)))
|
||||
|
||||
Reference in new issue
Block a user