Draft for the new javascript map scripting engine
Cache the dimensionId array. Saves us a lot of time in the tickloop