public void move(long delta, String direction) {
		int margin = (int) (getPos().getX()-4 % 64);
		switch (direction) {
		case "left":
			if (!Tilemap.currentTilemap.isXBlocked((int) getPos().getX() - 4, (int) getPos().getY(), 64, 64, -4)) {
				addPos(-4, 0);
			}else {
				System.out.println("blocked");
				if (margin > 0 && margin <= 32) {
					addPos(margin, 0);
				}
			}
			break;
		case "right":
			if (!Tilemap.currentTilemap.isXBlocked((int) getPos().getX() + 4, (int) getPos().getY(), 64, 64, 4)) {
				addPos(4, 0);
			}else {
				if (getPos().getX() % 64 > 0)
					addPos(64 - (getPos().getX() % 64), 0);
			}
			break;
		default:
			System.err.println(direction + " is an invalid direction.");
			break;
		}
	}