IA know what type of object I have winged and act accordingly

Hello, friends, I have to make an AI that are blocks, each block acts in a way depending on whether it has a wing or above or below that is, in each block grows a tree, bush, object depending on the block that it has winged, its altitude and others.

I don’t know how to start planting this, someone can help me channel it.

Spanish:
Hola, amigos tengo que hacer una IA que son bloques, cada bloque actúa de una manera según tenga alado o encima o debajo es decir en cada bloque crece un árbol, arbusto, objeto dependiendo del bloque que tenga alado, de su altitud y demás.

No sé cómo comenzar a plantar esto, alguien me puede ayudar a encauzarlo.

Thnks!

This question belongs in the Scripting Forum.