This commit is contained in:
parent
2a7b760398
commit
9b5a0db9aa
1 changed files with 17 additions and 9 deletions
|
@ -119,7 +119,6 @@ public class WrappedStack
|
||||||
}
|
}
|
||||||
else if (object instanceof FluidStack)
|
else if (object instanceof FluidStack)
|
||||||
{
|
{
|
||||||
|
|
||||||
FluidStack fluidStack = (FluidStack) object;
|
FluidStack fluidStack = (FluidStack) object;
|
||||||
|
|
||||||
className = object.getClass().getSimpleName();
|
className = object.getClass().getSimpleName();
|
||||||
|
@ -127,30 +126,40 @@ public class WrappedStack
|
||||||
fluidStack.amount = 1;
|
fluidStack.amount = 1;
|
||||||
wrappedStack = fluidStack;
|
wrappedStack = fluidStack;
|
||||||
}
|
}
|
||||||
|
// TODO EquivalencyStack handling
|
||||||
|
// else if (object instanceof EquivalencyStack)
|
||||||
|
// {
|
||||||
|
//
|
||||||
|
// }
|
||||||
else if (object instanceof WrappedStack)
|
else if (object instanceof WrappedStack)
|
||||||
{
|
{
|
||||||
|
|
||||||
WrappedStack wrappedStackObject = (WrappedStack) object;
|
WrappedStack wrappedStackObject = (WrappedStack) object;
|
||||||
|
|
||||||
|
if (wrappedStackObject.getWrappedStack() != null)
|
||||||
|
{
|
||||||
className = wrappedStackObject.wrappedStack.getClass().getSimpleName();
|
className = wrappedStackObject.wrappedStack.getClass().getSimpleName();
|
||||||
this.stackSize = wrappedStackObject.stackSize;
|
this.stackSize = wrappedStackObject.stackSize;
|
||||||
this.wrappedStack = wrappedStackObject.wrappedStack;
|
this.wrappedStack = wrappedStackObject.wrappedStack;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
className = null;
|
||||||
|
stackSize = -1;
|
||||||
|
wrappedStack = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (object instanceof String)
|
else if (object instanceof String)
|
||||||
{
|
{
|
||||||
|
|
||||||
WrappedStack wrappedStack = createFromJson((String) object);
|
WrappedStack wrappedStack = createFromJson((String) object);
|
||||||
|
|
||||||
if (wrappedStack != null)
|
if (wrappedStack != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
className = object.getClass().getSimpleName();
|
className = object.getClass().getSimpleName();
|
||||||
stackSize = wrappedStack.stackSize;
|
stackSize = wrappedStack.stackSize;
|
||||||
this.wrappedStack = wrappedStack.wrappedStack;
|
this.wrappedStack = wrappedStack.wrappedStack;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
className = null;
|
className = null;
|
||||||
stackSize = -1;
|
stackSize = -1;
|
||||||
this.wrappedStack = null;
|
this.wrappedStack = null;
|
||||||
|
@ -158,7 +167,6 @@ public class WrappedStack
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
className = null;
|
className = null;
|
||||||
stackSize = -1;
|
stackSize = -1;
|
||||||
wrappedStack = null;
|
wrappedStack = null;
|
||||||
|
|
Loading…
Reference in a new issue