boolean[] buildPermissions = new boolean[TerrainType.MAX_CATEGORIES];
boolean[] buildPermissions = new boolean[TerrainType.MAX_CATEGORIES + 1];
    public void end_TrackType() throws SAXException {	boolean[] buildPermissions = new boolean[TerrainType.MAX_CATEGORIES];	Iterator it = terrainTypes.iterator();	while (it.hasNext()) {	    Integer type = (Integer) it.next();	    buildPermissions[type.intValue()] = true;	}	byte[] legalConfigs = new byte[legalTemplates.size()];	for (int i = 0; i < legalConfigs.length; i++)	    legalConfigs[i] = ((Byte) legalTemplates.get(i)).byteValue();	TrackRule tr = new TrackRule(price, typeName, doubleTrack,		maintenance, legalConfigs, maxConsequ, buildPermissions);	world.add(KEY.TRACK_RULES, tr, Player.AUTHORITATIVE);    }