mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-11 07:57:33 +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 <sborovetchi@estatim.com>
This commit is contained in:
1 parent
2d18dcf42b
commit
144a37cebb
3 files changed
+20
-15
No files matched your search
@@ -14,9 +14,15 @@ public class DefaultStackStringifyHandler implements IStackStringifyHandler
|
||||
|
||||
public NBTTagCompound convertItemStackToNBT(ItemStack stack, boolean saveStackSize)
|
||||
{
|
||||
final String strId = Item.itemRegistry.getNameForObject(stack.getItem());
|
||||
|
||||
if (strId == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
final NBTTagCompound nbTag = new NBTTagCompound();
|
||||
nbTag.setString("strId", Item.itemRegistry.getNameForObject(stack.getItem()));
|
||||
nbTag.setInteger("Count", saveStackSize? stack.stackSize: 1);
|
||||
nbTag.setString("strId", strId);
|
||||
nbTag.setInteger("Count", Math.max(saveStackSize? stack.stackSize: 1, 1));
|
||||
nbTag.setShort("Damage", (short)stack.getItemDamage());
|
||||
|
||||
if (stack.hasTagCompound()) {
|
||||
|
||||
Reference in new issue
Block a user