@Override
	public void initialize(JSONObject dataMixinValue) throws JSONException,
			DataFormatException {
		JSONArray dataMixinArray = dataMixinValue.getJSONArray("mixins");
		this.regularTileMixins = new RegularTileMixin[dataMixinArray.length()];
		this.firstEventMixins = new FirstEventMixin[dataMixinArray.length()];
		for (int i = 0; i < dataMixinArray.length(); i++) {
			JSONObject dataChildMixinValue = dataMixinArray.getJSONObject(i);
			try {
				this.regularTileMixins[i] = ClassUtils
						.makeMixin(dataChildMixinValue);
			} catch (DataFormatException e) {
				if (!(e.getCause() instanceof ClassCastException)) {
					throw e;
				}
			}
			try {
				this.firstEventMixins[i] = ClassUtils
						.makeFirstEventMixin(dataChildMixinValue);
			} catch (DataFormatException e) {
				if (!(e.getCause() instanceof ClassCastException)) {
					throw e;
				}
			}
			if (this.regularTileMixins[i] == null
					&& this.firstEventMixins[i] == null) {
				// Since we've reached here, it must be a ClassCastException.
				throw new DataFormatException("Mixin with unknown type: "
						+ dataChildMixinValue.getString("class"));
			}
		}
	}