mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-15 17:54:50 +00:00
Fix crash with null fluid stack (#193)
* fix crash with null fluid stack * change minimum stack size in bookmarks Co-authored-by: Serghei Borovetchi <[email protected]>
This commit is contained in:
1 parent
2d18dcf42b
commit
144a37cebb
3 files changed
+20
-15
No files matched your search
@@ -31,12 +31,15 @@ public class GTFluidStackStringifyHandler implements IStackStringifyHandler
|
||||
{
|
||||
|
||||
if (GTDisplayFluid != null && GTDisplayFluid.isInstance(stack.getItem())) {
|
||||
final NBTTagCompound nbTag = new NBTTagCompound();
|
||||
final FluidStack fluidStack = getFluid(stack);
|
||||
|
||||
nbTag.setString("gtFluidName", fluidStack.getFluid().getName());
|
||||
nbTag.setInteger("Count", saveStackSize? fluidStack.amount: 1);
|
||||
return nbTag;
|
||||
if (fluidStack != null) {
|
||||
final NBTTagCompound nbTag = new NBTTagCompound();
|
||||
nbTag.setString("gtFluidName", fluidStack.getFluid().getName());
|
||||
nbTag.setInteger("Count", saveStackSize? fluidStack.amount: 1);
|
||||
return nbTag;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user