pahimar 2013-12-17 15:52:11 -05:00
parent 2a7b760398
commit 9b5a0db9aa

View file

@ -119,7 +119,6 @@ public class WrappedStack
}
else if (object instanceof FluidStack)
{
FluidStack fluidStack = (FluidStack) object;
className = object.getClass().getSimpleName();
@ -127,30 +126,40 @@ public class WrappedStack
fluidStack.amount = 1;
wrappedStack = fluidStack;
}
// TODO EquivalencyStack handling
// else if (object instanceof EquivalencyStack)
// {
//
// }
else if (object instanceof WrappedStack)
{
WrappedStack wrappedStackObject = (WrappedStack) object;
if (wrappedStackObject.getWrappedStack() != null)
{
className = wrappedStackObject.wrappedStack.getClass().getSimpleName();
this.stackSize = wrappedStackObject.stackSize;
this.wrappedStack = wrappedStackObject.wrappedStack;
}
else
{
className = null;
stackSize = -1;
wrappedStack = null;
}
}
else if (object instanceof String)
{
WrappedStack wrappedStack = createFromJson((String) object);
if (wrappedStack != null)
{
className = object.getClass().getSimpleName();
stackSize = wrappedStack.stackSize;
this.wrappedStack = wrappedStack.wrappedStack;
}
else
{
className = null;
stackSize = -1;
this.wrappedStack = null;
@ -158,7 +167,6 @@ public class WrappedStack
}
else
{
className = null;
stackSize = -1;
wrappedStack = null;