add null check to GregTech data stick NBT, closes #3336

This commit is contained in:
Adrian Siekierka 2022-06-07 16:16:21 +02:00
parent 21477efb77
commit a821ae02a8

View File

@ -14,7 +14,7 @@ class ConverterDataStick extends Converter {
override def convert(value: Any, output: util.Map[AnyRef, AnyRef]): Unit = if (value.isInstanceOf[ItemStack]) { override def convert(value: Any, output: util.Map[AnyRef, AnyRef]): Unit = if (value.isInstanceOf[ItemStack]) {
val stack = value.asInstanceOf[ItemStack] val stack = value.asInstanceOf[ItemStack]
val nbt = stack.stackTagCompound val nbt = stack.stackTagCompound
if (nbt.hasKey("prospection_tier")) if (nbt != null && nbt.hasKey("prospection_tier"))
nbt.getString("title") match { nbt.getString("title") match {
case "Raw Prospection Data" => getRawProspectionData(output, nbt) case "Raw Prospection Data" => getRawProspectionData(output, nbt)
case "Analyzed Prospection Data" => { case "Analyzed Prospection Data" => {