mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-12 08:17:29 +00:00
handle null aspect
This commit is contained in:
1 parent
aa25a5086d
commit
27ea81cd09
1 file changed
+2
-2
@@ -236,7 +236,7 @@ public class TileEntityPhialingCabinet extends TileEntity implements IAspectCont
|
||||
super.writeToNBT(compound);
|
||||
|
||||
this.essentia.writeToNBT(compound);
|
||||
compound.setString("aspect", aspect.getTag());
|
||||
if (aspect != null) compound.setString("aspect", aspect.getTag());
|
||||
compound.setInteger("increment", increment);
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ public class TileEntityPhialingCabinet extends TileEntity implements IAspectCont
|
||||
if (this.essentia.visSize() > this.maxAmount) {
|
||||
this.essentia = new AspectList();
|
||||
}
|
||||
aspect = Aspect.getAspect(compound.getString("aspect"));
|
||||
if (compound.hasKey("aspect")) aspect = Aspect.getAspect(compound.getString("aspect"));
|
||||
increment = compound.getInteger("increment");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user