Fix for cube particles

Fixed the problem where having fire particles in your world would make
all terrain based particles appear blank. Also a bit of refactoring.