include internal components for adapter onAnalyze

closes #2977
This commit is contained in:
payonel 2018-11-04 12:26:07 -08:00
parent 8149f0eb8e
commit ed99a18944

View File

@ -60,8 +60,13 @@ class Adapter extends traits.Environment with traits.ComponentInventory with tra
// ----------------------------------------------------------------------- //
override def onAnalyze(player: EntityPlayer, side: Int, hitX: Float, hitY: Float, hitZ: Float) = blocks collect {
case Some(((environment, _))) => environment.node
override def onAnalyze(player: EntityPlayer, side: Int, hitX: Float, hitY: Float, hitZ: Float): Array[Node] = {
(blocks collect {
case Some((environment, _)) => environment.node
}) ++
(components collect {
case Some(environment) => environment.node
})
}
// ----------------------------------------------------------------------- //