From 6929469358ab39b38eabf0c58ece297a3bb5ff1f Mon Sep 17 00:00:00 2001 From: Jordan Byrne Date: Sat, 10 Feb 2018 16:57:52 +1000 Subject: $ Initial rewrite of the recipe handling in the Matter Fabricator. + Added internal way for Multiblocks to get a Circuit stored in an input bus or it's GUI. + Added GenericStack.java, which can hold an ItemStack or a FluidStack, to simplify recipe outputs. --- src/Java/gtPlusPlus/api/objects/GenericStack.java | 41 +++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/Java/gtPlusPlus/api/objects/GenericStack.java (limited to 'src/Java/gtPlusPlus/api') diff --git a/src/Java/gtPlusPlus/api/objects/GenericStack.java b/src/Java/gtPlusPlus/api/objects/GenericStack.java new file mode 100644 index 0000000000..b3bc94364f --- /dev/null +++ b/src/Java/gtPlusPlus/api/objects/GenericStack.java @@ -0,0 +1,41 @@ +package gtPlusPlus.api.objects; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class GenericStack { + + private ItemStack mItemStack; + private FluidStack mFluidStack; + + public GenericStack(ItemStack s){ + this.mItemStack = s; + this.mFluidStack = null; + } + + public GenericStack(FluidStack f){ + this.mItemStack = null; + this.mFluidStack = f; + } + + public GenericStack() { + this.mItemStack = null; + this.mFluidStack = null; + } + + public synchronized final FluidStack getFluidStack() { + return mFluidStack; + } + + public synchronized final ItemStack getItemStack() { + return mItemStack; + } + + public synchronized final void setItemStack(ItemStack mItemStack) { + this.mItemStack = mItemStack; + } + + public synchronized final void setFluidStack(FluidStack mFluidStack) { + this.mFluidStack = mFluidStack; + } +} -- cgit