This commit is contained in:
Florian Nücke 2016-01-06 13:13:38 +01:00
parent fbd57de086
commit 49fbe0eef1

View File

@ -11,7 +11,7 @@ import scala.collection.convert.WrapAsScala._
object ConverterSafariNet extends Converter {
override def convert(value: scala.Any, output: util.Map[AnyRef, AnyRef]): Unit = value match {
case stack: ItemStack if stack.getItem.isInstanceOf[ItemSafariNet] =>
case stack: ItemStack if stack.getItem.isInstanceOf[ItemSafariNet] && stack.hasTagCompound =>
val nbt = stack.getTagCompound
if (nbt.hasKey("id", NBT.TAG_STRING) && !nbt.getBoolean("hide")) {
output += "entity" -> nbt.getString("id")