public Body createBody(World world, MapObject mapObject) {
		MapProperties properties = mapObject.getProperties();

		String type = properties.get("type", String.class);
		if(!type.equals(aliases.body) && !type.equals(aliases.object))
			throw new IllegalArgumentException("type of " + mapObject + " is  \"" + type + "\" instead of \"" + aliases.body + "\" or \"" + aliases.object + "\"");

		BodyDef bodyDef = new BodyDef();
		bodyDef.type = properties.get(aliases.bodyType, String.class) != null ? properties.get(aliases.bodyType, String.class).equals(aliases.dynamicBody) ? BodyType.DynamicBody : properties.get(aliases.bodyType, String.class).equals(aliases.kinematicBody) ? BodyType.KinematicBody : properties.get(aliases.bodyType, String.class).equals(aliases.staticBody) ? BodyType.StaticBody : bodyDef.type : bodyDef.type;
		bodyDef.active = (Boolean) getProperty(properties, aliases.active, bodyDef.active, Boolean.class);
		bodyDef.allowSleep = (Boolean) getProperty(properties, aliases.allowSleep, bodyDef.allowSleep, Boolean.class);
		bodyDef.angle = (Float) getProperty(properties, aliases.angle, bodyDef.angle, Float.class);
		bodyDef.angularDamping = (Float) getProperty(properties, aliases.angularDamping, bodyDef.angularDamping, Float.class);
		bodyDef.angularVelocity = (Float) getProperty(properties, aliases.angularVelocity, bodyDef.angularVelocity, Float.class);
		bodyDef.awake = (Boolean) getProperty(properties, aliases.awake, bodyDef.awake, Boolean.class);
		bodyDef.bullet = (Boolean) getProperty(properties, aliases.bullet, bodyDef.bullet, Boolean.class);
		bodyDef.fixedRotation = (Boolean) getProperty(properties, aliases.fixedRotation, bodyDef.fixedRotation, Boolean.class);
		bodyDef.gravityScale = (Float) getProperty(properties, aliases.gravityunitScale, bodyDef.gravityScale, Float.class);
		bodyDef.linearDamping = (Float) getProperty(properties, aliases.linearDamping, bodyDef.linearDamping, Float.class);
		bodyDef.linearVelocity.set((Float) getProperty(properties, aliases.linearVelocityX, bodyDef.linearVelocity.x, Float.class), (Float) getProperty(properties, aliases.linearVelocityY, bodyDef.linearVelocity.y, Float.class));
		bodyDef.position.set((Float) getProperty(properties, "x", bodyDef.position.x, Integer.class) * unitScale, (Float) getProperty(properties, "y", bodyDef.position.y, Integer.class) * unitScale);

		Body body = world.createBody(bodyDef);

		String name = mapObject.getName();
		if(bodies.containsKey(name)) {
			int duplicate = 1;
			while(bodies.containsKey(name + duplicate))
				duplicate++;
			name += duplicate;
		}

		bodies.put(name, body);

		return body;
	}