Distillation pattern aspect information

This commit is contained in:
repo_alt 2019-04-24 18:23:08 +03:00
parent 93427705f2
commit 25d750b3e2
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,15 @@
package li.cil.oc.integration.thaumicenergistics
import java.util
import cpw.mods.fml.common.registry.GameRegistry
import li.cil.oc.api.driver.Converter
import net.minecraft.item.ItemStack
import scala.collection.convert.WrapAsScala._
object ConvertAspectCraftable extends Converter {
private val DistillationPattern = GameRegistry.findItem("thaumicenergistics", "crafting.aspect")
override def convert(value: scala.Any, output: util.Map[AnyRef, AnyRef]): Unit = value match {
case stack: ItemStack if stack.getItem == DistillationPattern && stack.hasTagCompound =>
output += "aspect" -> stack.getTagCompound.getString("Aspect")
case _ =>
}
}

View File

@ -14,5 +14,6 @@ object ModThaumicEnergistics extends ModProxy {
Driver.add(DriverController.Provider)
Driver.add(DriverBlockInterface.Provider)
Driver.add(ConvertAspectCraftable)
}
}