fixed syntax errors. don't submit code with errors please.
Also fixed a bug in the AI logic where vanilla entities wouldnt spawn